These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git] / kernel / arch / parisc / kernel / irq.c
index f3191db..c0eab24 100644 (file)
@@ -507,8 +507,8 @@ void do_cpu_irq_mask(struct pt_regs *regs)
        struct pt_regs *old_regs;
        unsigned long eirr_val;
        int irq, cpu = smp_processor_id();
-#ifdef CONFIG_SMP
        struct irq_desc *desc;
+#ifdef CONFIG_SMP
        cpumask_t dest;
 #endif
 
@@ -521,8 +521,12 @@ void do_cpu_irq_mask(struct pt_regs *regs)
                goto set_out;
        irq = eirr_to_irq(eirr_val);
 
-#ifdef CONFIG_SMP
+       /* Filter out spurious interrupts, mostly from serial port at bootup */
        desc = irq_to_desc(irq);
+       if (unlikely(!desc->action))
+               goto set_out;
+
+#ifdef CONFIG_SMP
        cpumask_copy(&dest, desc->irq_data.affinity);
        if (irqd_is_per_cpu(&desc->irq_data) &&
            !cpumask_test_cpu(smp_processor_id(), &dest)) {