diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 19:08:55 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 19:08:55 +0900 |
commit | 763142d1efb56effe614d71185781796c4b83c78 (patch) | |
tree | f886c239786fd4be028e3a45006c5cc5c1b3a3f2 /arch/sh/kernel/idle.c | |
parent | 8db2bc4559639680a94d4492ae4b7ce71298a74f (diff) | |
download | op-kernel-dev-763142d1efb56effe614d71185781796c4b83c78.zip op-kernel-dev-763142d1efb56effe614d71185781796c4b83c78.tar.gz |
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 2040053..425d604 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c @@ -19,6 +19,7 @@ #include <asm/pgalloc.h> #include <asm/system.h> #include <asm/atomic.h> +#include <asm/smp.h> void (*pm_idle)(void) = NULL; @@ -89,10 +90,13 @@ void cpu_idle(void) while (1) { tick_nohz_stop_sched_tick(1); - while (!need_resched() && cpu_online(cpu)) { + while (!need_resched()) { check_pgt_cache(); rmb(); + if (cpu_is_offline(cpu)) + play_dead(); + local_irq_disable(); /* Don't trace irqs off for idle */ stop_critical_timings(); |