]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/kernel/mpparse.c
Merge tag 'mips_fixes_4.16_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
[linux.git] / arch / x86 / kernel / mpparse.c
index bc6bc6689e68a7bd602b11849d5d13892b05c982..f1c5eb99d445407a9fc134e76a8010d17a61d780 100644 (file)
@@ -281,7 +281,7 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
        int ELCR_fallback = 0;
 
        intsrc.type = MP_INTSRC;
-       intsrc.irqflag = 0;     /* conforming */
+       intsrc.irqflag = MP_IRQTRIG_DEFAULT | MP_IRQPOL_DEFAULT;
        intsrc.srcbus = 0;
        intsrc.dstapic = mpc_ioapic_id(0);
 
@@ -324,10 +324,13 @@ static void __init construct_default_ioirq_mptable(int mpc_default_type)
                         *  copy that information over to the MP table in the
                         *  irqflag field (level sensitive, active high polarity).
                         */
-                       if (ELCR_trigger(i))
-                               intsrc.irqflag = 13;
-                       else
-                               intsrc.irqflag = 0;
+                       if (ELCR_trigger(i)) {
+                               intsrc.irqflag = MP_IRQTRIG_LEVEL |
+                                                MP_IRQPOL_ACTIVE_HIGH;
+                       } else {
+                               intsrc.irqflag = MP_IRQTRIG_DEFAULT |
+                                                MP_IRQPOL_DEFAULT;
+                       }
                }
 
                intsrc.srcbusirq = i;
@@ -419,7 +422,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
        construct_ioapic_table(mpc_default_type);
 
        lintsrc.type = MP_LINTSRC;
-       lintsrc.irqflag = 0;            /* conforming */
+       lintsrc.irqflag = MP_IRQTRIG_DEFAULT | MP_IRQPOL_DEFAULT;
        lintsrc.srcbusid = 0;
        lintsrc.srcbusirq = 0;
        lintsrc.destapic = MP_APIC_ALL;
@@ -664,7 +667,7 @@ static int  __init get_MP_intsrc_index(struct mpc_intsrc *m)
        if (m->irqtype != mp_INT)
                return 0;
 
-       if (m->irqflag != 0x0f)
+       if (m->irqflag != (MP_IRQTRIG_LEVEL | MP_IRQPOL_ACTIVE_LOW))
                return 0;
 
        /* not legacy */
@@ -673,7 +676,8 @@ static int  __init get_MP_intsrc_index(struct mpc_intsrc *m)
                if (mp_irqs[i].irqtype != mp_INT)
                        continue;
 
-               if (mp_irqs[i].irqflag != 0x0f)
+               if (mp_irqs[i].irqflag != (MP_IRQTRIG_LEVEL |
+                                          MP_IRQPOL_ACTIVE_LOW))
                        continue;
 
                if (mp_irqs[i].srcbus != m->srcbus)
@@ -784,7 +788,8 @@ static int  __init replace_intsrc_all(struct mpc_table *mpc,
                if (mp_irqs[i].irqtype != mp_INT)
                        continue;
 
-               if (mp_irqs[i].irqflag != 0x0f)
+               if (mp_irqs[i].irqflag != (MP_IRQTRIG_LEVEL |
+                                          MP_IRQPOL_ACTIVE_LOW))
                        continue;
 
                if (nr_m_spare > 0) {