From fc563f23881366463e528340b1660bc82e68633a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 20 Jul 2010 14:34:50 +0200 Subject: [PATCH] cpu-hotplug: Prevent softirq wakeup on wrong CPU commit 96c5397b25bfa8910d4f89ec99190edafc251525 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/x86/kernel/smpboot.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 763d815..8849ce2 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -329,6 +329,9 @@ notrace static void __cpuinit start_secondary(void *unused) per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; x86_platform.nmi_init(); + while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask)) + cpu_relax(); + /* enable local interrupts */ local_irq_enable(); -- 1.7.0.4