diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:25 -0400 |
commit | 4e0fcc567239ef4b3f80bba778c30b0a4b624eff (patch) | |
tree | 9e1f410b32c6934eb5643bb669553f097af9de45 /arch/hexagon/kernel/process.c | |
parent | 0d24260c9e27fc1de20c72669bcc387767a1c170 (diff) |
hexagon: 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: Richard Kuo <rkuo@codeaurora.org>
Link: http://lkml.kernel.org/r/20130321215234.338692935@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/hexagon/kernel/process.c')
-rw-r--r-- | arch/hexagon/kernel/process.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index 06ae9ffcabd5..9b948c619a03 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c | |||
@@ -51,28 +51,11 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) | |||
51 | * If hardware or VM offer wait termination even though interrupts | 51 | * If hardware or VM offer wait termination even though interrupts |
52 | * are disabled. | 52 | * are disabled. |
53 | */ | 53 | */ |
54 | static void default_idle(void) | 54 | void arch_cpu_idle(void) |
55 | { | 55 | { |
56 | __vmwait(); | 56 | __vmwait(); |
57 | } | 57 | /* interrupts wake us up, but irqs are still disabled */ |
58 | 58 | local_irq_enable(); | |
59 | void (*idle_sleep)(void) = default_idle; | ||
60 | |||
61 | void cpu_idle(void) | ||
62 | { | ||
63 | while (1) { | ||
64 | tick_nohz_idle_enter(); | ||
65 | local_irq_disable(); | ||
66 | while (!need_resched()) { | ||
67 | idle_sleep(); | ||
68 | /* interrupts wake us up, but aren't serviced */ | ||
69 | local_irq_enable(); /* service interrupt */ | ||
70 | local_irq_disable(); | ||
71 | } | ||
72 | local_irq_enable(); | ||
73 | tick_nohz_idle_exit(); | ||
74 | schedule(); | ||
75 | } | ||
76 | } | 59 | } |
77 | 60 | ||
78 | /* | 61 | /* |