Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~shefty/rdma-dev.git] / arch / x86 / kernel / apic / io_apic.c
index 0c1f36650568d9e6ba4dc7f22cc5ee206203b928..70aa621df118d69d08e3b4654678318c58c6dbf2 100644 (file)
@@ -2185,9 +2185,11 @@ static int ioapic_retrigger_irq(struct irq_data *data)
 {
        struct irq_cfg *cfg = data->chip_data;
        unsigned long flags;
+       int cpu;
 
        raw_spin_lock_irqsave(&vector_lock, flags);
-       apic->send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector);
+       cpu = cpumask_first_and(cfg->domain, cpu_online_mask);
+       apic->send_IPI_mask(cpumask_of(cpu), cfg->vector);
        raw_spin_unlock_irqrestore(&vector_lock, flags);
 
        return 1;
@@ -2243,6 +2245,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
                        continue;
 
                cfg = irq_cfg(irq);
+               if (!cfg)
+                       continue;
+
                raw_spin_lock(&desc->lock);
 
                /*