blob: e7983a0fbf030313474621dfea2c19362a240445 [file] [log] [blame]
From 59fdcc01a4952a521dbae619254d1d4e3f0651e7 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 20 Jul 2010 14:34:50 +0200
Subject: [PATCH] powerpc: cpu-hotplug: Prevent softirq wakeup on wrong CPU
commit 59fdcc01a4952a521dbae619254d1d4e3f0651e7 in tip.
When the plugged CPU sets the online flag it enables interrupts and
goes idle. When an interrupt happens and tried to wakeup a softirq
thread before the other cpu sets the active flag, then the softirq
thread is put on one of the active cpus. Prevent this by waiting for
the cpu_active bit.
Temporary workaround. Needs more thought.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index c2ee144..c09bbc7 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -541,6 +541,9 @@ int __devinit start_secondary(void *unused)
of_node_put(l2_cache);
ipi_call_unlock();
+ while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask))
+ cpu_relax();
+
local_irq_enable();
cpu_idle();
--
1.7.1.1