We want to synchronize new vector assignments with a pending cleanup. Remove a
dying cpu from a pending cleanup mask.

Signed-off-by: Thomas Gleixner <[email protected]>
---
 arch/x86/kernel/apic/vector.c |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -631,9 +631,23 @@ void irq_complete_move(struct irq_cfg *c
 void irq_force_complete_move(int irq)
 {
        struct irq_cfg *cfg = irq_cfg(irq);
+       struct apic_chip_data *data;
 
-       if (cfg)
-               __irq_complete_move(cfg, cfg->vector);
+       if (!cfg)
+               return;
+
+       __irq_complete_move(cfg, cfg->vector);
+
+       /*
+        * Remove this cpu from the cleanup mask. The IPI might have been sent
+        * just before the cpu was removed from the offline mask, but has not
+        * been processed because the CPU has interrupts disabled and is on
+        * the way out.
+        */
+       raw_spin_lock(&vector_lock);
+       data = container_of(cfg, struct apic_chip_data, cfg);
+       cpumask_clear_cpu(smp_processor_id(), data->old_domain);
+       raw_spin_unlock(&vector_lock);
 }
 #endif
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to