aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/idle.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-04-26 06:08:55 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-04-26 06:08:55 -0400
commit763142d1efb56effe614d71185781796c4b83c78 (patch)
treef886c239786fd4be028e3a45006c5cc5c1b3a3f2 /arch/sh/kernel/idle.c
parent8db2bc4559639680a94d4492ae4b7ce71298a74f (diff)
sh: CPU hotplug support.
This adds preliminary support for CPU hotplug for SH SMP systems. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/idle.c')
-rw-r--r--arch/sh/kernel/idle.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 204005329fe..425d604e3a2 100644
--- a/arch/sh/kernel/idle.c
+++ b/arch/sh/kernel/idle.c
@@ -19,6 +19,7 @@
19#include <asm/pgalloc.h> 19#include <asm/pgalloc.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <asm/atomic.h> 21#include <asm/atomic.h>
22#include <asm/smp.h>
22 23
23void (*pm_idle)(void) = NULL; 24void (*pm_idle)(void) = NULL;
24 25
@@ -89,10 +90,13 @@ void cpu_idle(void)
89 while (1) { 90 while (1) {
90 tick_nohz_stop_sched_tick(1); 91 tick_nohz_stop_sched_tick(1);
91 92
92 while (!need_resched() && cpu_online(cpu)) { 93 while (!need_resched()) {
93 check_pgt_cache(); 94 check_pgt_cache();
94 rmb(); 95 rmb();
95 96
97 if (cpu_is_offline(cpu))
98 play_dead();
99
96 local_irq_disable(); 100 local_irq_disable();
97 /* Don't trace irqs off for idle */ 101 /* Don't trace irqs off for idle */
98 stop_critical_timings(); 102 stop_critical_timings();