summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-11-30 12:21:30 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-08 13:44:42 +0000
commit554f66de91206bb86bb0e534e35e2fc760129000 (patch)
tree409ba2b864aeeaa6ba1049a2c4d7226a5e47c66b /arch
parentaa463c35c5d4f518abe59e3640357cebe5aead85 (diff)
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: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/smp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 966c4fcf15d1..97b2b6db90dd 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -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);