Skip to content

Commit

Permalink
ARM: CPU hotplug: ensure correct ordering of unplug
Browse files Browse the repository at this point in the history
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: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent bbc81fd commit f36d340
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ void __ref cpu_die(void)
{
unsigned int cpu = smp_processor_id();

local_irq_disable();
idle_task_exit();

local_irq_disable();
mb();

/* Tell __cpu_die() that this CPU is now safe to dispose of */
complete(&cpu_died);

Expand Down

0 comments on commit f36d340

Please sign in to comment.