aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/smp.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-11-30 07:21:30 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:09:11 -0500
commitf36d340122ae8744e64af0a92a6f77b97542c0a4 (patch)
tree85f7d8dc6d1407ea0fd7b3673a8b9ce0ec9d7507 /arch/arm/kernel/smp.c
parentbbc81fd4327f9ed4480b05981e38acd48b1d184a (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/arm/kernel/smp.c')
-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 8c81ff9b3732..1a1c5e2b3ef9 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -269,9 +269,11 @@ void __ref cpu_die(void)
269{ 269{
270 unsigned int cpu = smp_processor_id(); 270 unsigned int cpu = smp_processor_id();
271 271
272 local_irq_disable();
273 idle_task_exit(); 272 idle_task_exit();
274 273
274 local_irq_disable();
275 mb();
276
275 /* Tell __cpu_die() that this CPU is now safe to dispose of */ 277 /* Tell __cpu_die() that this CPU is now safe to dispose of */
276 complete(&cpu_died); 278 complete(&cpu_died);
277 279