diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-02-10 02:46:50 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-01 00:37:10 -0400 |
commit | 4fcb8833af3355065bd8bffcd338eabc6f3a38a0 (patch) | |
tree | 7a23046e93e04d47ab2cabfb5727531ba7fd3100 /arch/powerpc/kernel/smp.c | |
parent | fa3f82c8bb7acbe049ea71f258b3ae0a33d9d40b (diff) |
powerpc/smp: Fix generic_mach_cpu_die()
This is used by some "soft" hotplug implementations. I needs to
call idle_task_exit() when the CPU is going away, and we remove
the now no-longer needed set_cpu_online() and local_irq_enable()
which are handled by the return to start_secondary
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 1c9956c43801..3c0fab5e1e16 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -362,14 +362,13 @@ void generic_mach_cpu_die(void) | |||
362 | unsigned int cpu; | 362 | unsigned int cpu; |
363 | 363 | ||
364 | local_irq_disable(); | 364 | local_irq_disable(); |
365 | idle_task_exit(); | ||
365 | cpu = smp_processor_id(); | 366 | cpu = smp_processor_id(); |
366 | printk(KERN_DEBUG "CPU%d offline\n", cpu); | 367 | printk(KERN_DEBUG "CPU%d offline\n", cpu); |
367 | __get_cpu_var(cpu_state) = CPU_DEAD; | 368 | __get_cpu_var(cpu_state) = CPU_DEAD; |
368 | smp_wmb(); | 369 | smp_wmb(); |
369 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | 370 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) |
370 | cpu_relax(); | 371 | cpu_relax(); |
371 | set_cpu_online(cpu, true); | ||
372 | local_irq_enable(); | ||
373 | } | 372 | } |
374 | #endif | 373 | #endif |
375 | 374 | ||