Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

lm32: Fix idle function

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
  • Loading branch information...
commit 064001a258a8be3556baa9fe289a388cfcebe5dc 1 parent 69bceed
Lars-Peter Clausen authored

Showing 1 changed file with 3 additions and 23 deletions. Show diff stats Hide diff stats

  1. 26  arch/lm32/kernel/process.c
26  arch/lm32/kernel/process.c
@@ -54,30 +54,10 @@ asmlinkage void syscall_tail(void);
54 54
 void (*pm_power_off)(void);
55 55
 EXPORT_SYMBOL(pm_power_off);
56 56
 
57  
-/*
58  
- * The idle loop on an LM32
59  
- */
60  
-static void default_idle(void)
61  
-{
62  
- 	while(!need_resched())
63  
-		__asm__ __volatile__("and r0, r0, r0" ::: "memory");
64  
-}
65  
-
66  
-/*
67  
- * The idle thread. There's no useful work to be
68  
- * done, so just try to conserve power and have a
69  
- * low exit latency (ie sit in a loop waiting for
70  
- * somebody to say that they'd like to reschedule)
71  
- */
72  
-void cpu_idle(void)
  57
+void arch_cpu_idle(void)
73 58
 {
74  
-	/* endless idle loop with no priority at all */
75  
-	while (1) {
76  
-		default_idle();
77  
-		preempt_enable_no_resched();
78  
-		schedule();
79  
-		preempt_disable();
80  
-	}
  59
+	__asm__ __volatile__("and r0, r0, r0" ::: "memory");
  60
+	local_irq_enable();
81 61
 }
82 62
 
83 63
 void __weak machine_restart(char * __unused)

0 notes on commit 064001a

Please sign in to comment.
Something went wrong with that request. Please try again.