diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:43 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:25 -0400 |
commit | 8dc7c5ecd8d0f739728d844ee794c4fae169f9c2 (patch) | |
tree | 744664a4cb45793ff43853acf591eb2980dc87d9 /arch/cris/kernel | |
parent | e46746cd5542b74f1e34bb1b8a997c5c0a6e69ea (diff) |
cris: Use generic idle loop
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Link: http://lkml.kernel.org/r/20130321215234.148829489@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r-- | arch/cris/kernel/process.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 508c9cdacc7b..b78498eb079b 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -34,29 +34,9 @@ extern void default_idle(void); | |||
34 | void (*pm_power_off)(void); | 34 | void (*pm_power_off)(void); |
35 | EXPORT_SYMBOL(pm_power_off); | 35 | EXPORT_SYMBOL(pm_power_off); |
36 | 36 | ||
37 | /* | 37 | void arch_cpu_idle(void) |
38 | * The idle thread. There's no useful work to be | ||
39 | * done, so just try to conserve power and have a | ||
40 | * low exit latency (ie sit in a loop waiting for | ||
41 | * somebody to say that they'd like to reschedule) | ||
42 | */ | ||
43 | |||
44 | void cpu_idle (void) | ||
45 | { | 38 | { |
46 | /* endless idle loop with no priority at all */ | 39 | default_idle(); |
47 | while (1) { | ||
48 | rcu_idle_enter(); | ||
49 | while (!need_resched()) { | ||
50 | /* | ||
51 | * Mark this as an RCU critical section so that | ||
52 | * synchronize_kernel() in the unload path waits | ||
53 | * for our completion. | ||
54 | */ | ||
55 | default_idle(); | ||
56 | } | ||
57 | rcu_idle_exit(); | ||
58 | schedule_preempt_disabled(); | ||
59 | } | ||
60 | } | 40 | } |
61 | 41 | ||
62 | void hard_reset_now (void); | 42 | void hard_reset_now (void); |