diff options
Diffstat (limited to 'arch/sh/kernel/idle.c')
-rw-r--r-- | arch/sh/kernel/idle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 273f890b17a..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 | ||
23 | void (*pm_idle)(void) = NULL; | 24 | void (*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(); |
@@ -133,7 +137,7 @@ static void do_nothing(void *unused) | |||
133 | void stop_this_cpu(void *unused) | 137 | void stop_this_cpu(void *unused) |
134 | { | 138 | { |
135 | local_irq_disable(); | 139 | local_irq_disable(); |
136 | cpu_clear(smp_processor_id(), cpu_online_map); | 140 | set_cpu_online(smp_processor_id(), false); |
137 | 141 | ||
138 | for (;;) | 142 | for (;;) |
139 | cpu_sleep(); | 143 | cpu_sleep(); |