提交 4fcb8833 编写于 作者: B Benjamin Herrenschmidt

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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 fa3f82c8
...@@ -362,14 +362,13 @@ void generic_mach_cpu_die(void) ...@@ -362,14 +362,13 @@ void generic_mach_cpu_die(void)
unsigned int cpu; unsigned int cpu;
local_irq_disable(); local_irq_disable();
idle_task_exit();
cpu = smp_processor_id(); cpu = smp_processor_id();
printk(KERN_DEBUG "CPU%d offline\n", cpu); printk(KERN_DEBUG "CPU%d offline\n", cpu);
__get_cpu_var(cpu_state) = CPU_DEAD; __get_cpu_var(cpu_state) = CPU_DEAD;
smp_wmb(); smp_wmb();
while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
cpu_relax(); cpu_relax();
set_cpu_online(cpu, true);
local_irq_enable();
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册