]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use not_pci bitmap #6
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Thu, 20 Mar 2008 11:54:49 +0000 (14:54 +0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:59 +0000 (17:40 +0200)
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/io_apic_32.c

index e400f77eb0e0daae68d3d2831c575fca3ea25a01..97ac6104d63a0fcfa9fb2b9f9b8c1e51c9b7866d 100644 (file)
@@ -1091,39 +1091,22 @@ static int pin_2_irq(int idx, int apic, int pin)
        if (mp_irqs[idx].mpc_dstirq != pin)
                printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n");
 
-       switch (mp_bus_id_to_type[bus])
-       {
-               case MP_BUS_ISA: /* ISA pin */
-               case MP_BUS_EISA:
-               case MP_BUS_MCA:
-               {
-                       irq = mp_irqs[idx].mpc_srcbusirq;
-                       break;
-               }
-               case MP_BUS_PCI: /* PCI pin */
-               {
-                       /*
-                        * PCI IRQs are mapped in order
-                        */
-                       i = irq = 0;
-                       while (i < apic)
-                               irq += nr_ioapic_registers[i++];
-                       irq += pin;
-
-                       /*
-                        * For MPS mode, so far only needed by ES7000 platform
-                        */
-                       if (ioapic_renumber_irq)
-                               irq = ioapic_renumber_irq(apic, irq);
+       if (test_bit(bus, mp_bus_not_pci))
+               irq = mp_irqs[idx].mpc_srcbusirq;
+       else {
+               /*
+                * PCI IRQs are mapped in order
+                */
+               i = irq = 0;
+               while (i < apic)
+                       irq += nr_ioapic_registers[i++];
+               irq += pin;
 
-                       break;
-               }
-               default:
-               {
-                       printk(KERN_ERR "unknown bus type %d.\n",bus); 
-                       irq = 0;
-                       break;
-               }
+               /*
+                * For MPS mode, so far only needed by ES7000 platform
+                */
+               if (ioapic_renumber_irq)
+                       irq = ioapic_renumber_irq(apic, irq);
        }
 
        /*