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 | |
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')
-rw-r--r-- | arch/hexagon/Kconfig | 1 | ||||
-rw-r--r-- | arch/hexagon/kernel/process.c | 23 | ||||
-rw-r--r-- | arch/hexagon/kernel/smp.c | 2 |
3 files changed, 5 insertions, 21 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index e4decc6b8947..6e3710e84a6c 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -24,6 +24,7 @@ config HEXAGON | |||
24 | select NO_IOPORT | 24 | select NO_IOPORT |
25 | select GENERIC_IOMAP | 25 | select GENERIC_IOMAP |
26 | select GENERIC_SMP_IDLE_THREAD | 26 | select GENERIC_SMP_IDLE_THREAD |
27 | select GENERIC_IDLE_LOOP | ||
27 | select STACKTRACE_SUPPORT | 28 | select STACKTRACE_SUPPORT |
28 | select KTIME_SCALAR | 29 | select KTIME_SCALAR |
29 | select GENERIC_CLOCKEVENTS | 30 | select GENERIC_CLOCKEVENTS |
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 | /* |
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 8e095dffd070..0e364ca43198 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
@@ -184,7 +184,7 @@ void __cpuinit start_secondary(void) | |||
184 | 184 | ||
185 | local_irq_enable(); | 185 | local_irq_enable(); |
186 | 186 | ||
187 | cpu_idle(); | 187 | cpu_startup_entry(CPUHP_ONLINE); |
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||