From cff36f861d0e90f7d255ca4c9722ad2f347e9f09 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner 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 Signed-off-by: Paul Gortmaker --- arch/powerpc/kernel/smp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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.0.4