Commit f36d3401 authored by Russell King's avatar Russell King

ARM: CPU hotplug: ensure correct ordering of unplug

Don't call idle_task_exit() with interrupts disabled, and ensure
that we have a memory barrier after interrupts are disabled but
before signalling that this CPU has shut down.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent bbc81fd4
...@@ -269,9 +269,11 @@ void __ref cpu_die(void) ...@@ -269,9 +269,11 @@ void __ref cpu_die(void)
{ {
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
local_irq_disable();
idle_task_exit(); idle_task_exit();
local_irq_disable();
mb();
/* Tell __cpu_die() that this CPU is now safe to dispose of */ /* Tell __cpu_die() that this CPU is now safe to dispose of */
complete(&cpu_died); complete(&cpu_died);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment