Loading arch/x86_64/kernel/io_apic.c +22 −70 Original line number Original line Diff line number Diff line Loading @@ -308,7 +308,7 @@ static int __init find_isa_irq_pin(int irq, int type) for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) { int lbus = mp_irqs[i].mpc_srcbus; int lbus = mp_irqs[i].mpc_srcbus; if (mp_bus_id_to_type[lbus] == MP_BUS_ISA && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_srcbusirq == irq)) (mp_irqs[i].mpc_srcbusirq == irq)) Loading @@ -324,7 +324,7 @@ static int __init find_isa_irq_apic(int irq, int type) for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) { int lbus = mp_irqs[i].mpc_srcbus; int lbus = mp_irqs[i].mpc_srcbus; if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA) && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_srcbusirq == irq)) (mp_irqs[i].mpc_srcbusirq == irq)) break; break; Loading Loading @@ -364,7 +364,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) mp_irqs[i].mpc_dstapic == MP_APIC_ALL) mp_irqs[i].mpc_dstapic == MP_APIC_ALL) break; break; if ((mp_bus_id_to_type[lbus] == MP_BUS_PCI) && if (!test_bit(lbus, mp_bus_not_pci) && !mp_irqs[i].mpc_irqtype && !mp_irqs[i].mpc_irqtype && (bus == lbus) && (bus == lbus) && (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { Loading Loading @@ -410,28 +410,11 @@ static int __init MPBIOS_polarity(int idx) switch (mp_irqs[idx].mpc_irqflag & 3) switch (mp_irqs[idx].mpc_irqflag & 3) { { case 0: /* conforms, ie. bus-type dependent polarity */ case 0: /* conforms, ie. bus-type dependent polarity */ { if (test_bit(bus, mp_bus_not_pci)) switch (mp_bus_id_to_type[bus]) { case MP_BUS_ISA: /* ISA pin */ { polarity = default_ISA_polarity(idx); polarity = default_ISA_polarity(idx); break; else } case MP_BUS_PCI: /* PCI pin */ { polarity = default_PCI_polarity(idx); polarity = default_PCI_polarity(idx); break; break; } default: { printk(KERN_WARNING "broken BIOS!!\n"); polarity = 1; break; } } break; } case 1: /* high active */ case 1: /* high active */ { { polarity = 0; polarity = 0; Loading Loading @@ -469,28 +452,11 @@ static int MPBIOS_trigger(int idx) switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) { { case 0: /* conforms, ie. bus-type dependent */ case 0: /* conforms, ie. bus-type dependent */ { if (test_bit(bus, mp_bus_not_pci)) switch (mp_bus_id_to_type[bus]) { case MP_BUS_ISA: /* ISA pin */ { trigger = default_ISA_trigger(idx); trigger = default_ISA_trigger(idx); break; else } case MP_BUS_PCI: /* PCI pin */ { trigger = default_PCI_trigger(idx); trigger = default_PCI_trigger(idx); break; break; } default: { printk(KERN_WARNING "broken BIOS!!\n"); trigger = 1; break; } } break; } case 1: /* edge */ case 1: /* edge */ { { trigger = 0; trigger = 0; Loading Loading @@ -596,15 +562,9 @@ static int pin_2_irq(int idx, int apic, int pin) if (mp_irqs[idx].mpc_dstirq != pin) if (mp_irqs[idx].mpc_dstirq != pin) printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); switch (mp_bus_id_to_type[bus]) if (test_bit(bus, mp_bus_not_pci)) { { case MP_BUS_ISA: /* ISA pin */ { irq = mp_irqs[idx].mpc_srcbusirq; irq = mp_irqs[idx].mpc_srcbusirq; break; } else { } case MP_BUS_PCI: /* PCI pin */ { /* /* * PCI IRQs are mapped in order * PCI IRQs are mapped in order */ */ Loading @@ -613,14 +573,6 @@ static int pin_2_irq(int idx, int apic, int pin) irq += nr_ioapic_registers[i++]; irq += nr_ioapic_registers[i++]; irq += pin; irq += pin; irq = gsi_irq_sharing(irq); irq = gsi_irq_sharing(irq); break; } default: { printk(KERN_ERR "unknown bus type %d.\n",bus); irq = 0; break; } } } BUG_ON(irq >= NR_IRQS); BUG_ON(irq >= NR_IRQS); return irq; return irq; Loading arch/x86_64/kernel/mpparse.c +4 −5 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,7 @@ int acpi_found_madt; * MP-table. * MP-table. */ */ unsigned char apic_version [MAX_APICS]; unsigned char apic_version [MAX_APICS]; unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; static int mp_current_pci_id = 0; static int mp_current_pci_id = 0; Loading Loading @@ -173,9 +173,9 @@ static void __init MP_bus_info (struct mpc_config_bus *m) Dprintk("Bus #%d is %s\n", m->mpc_busid, str); Dprintk("Bus #%d is %s\n", m->mpc_busid, str); if (strncmp(str, "ISA", 3) == 0) { if (strncmp(str, "ISA", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; set_bit(m->mpc_busid, mp_bus_not_pci); } else if (strncmp(str, "PCI", 3) == 0) { } else if (strncmp(str, "PCI", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; clear_bit(m->mpc_busid, mp_bus_not_pci); mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; mp_current_pci_id++; mp_current_pci_id++; } else { } else { Loading Loading @@ -808,8 +808,7 @@ void __init mp_config_acpi_legacy_irqs (void) /* /* * Fabricate the legacy ISA bus (bus #31). * Fabricate the legacy ISA bus (bus #31). */ */ mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA; set_bit(MP_ISA_BUS, mp_bus_not_pci); Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); /* /* * Locate the IOAPIC that manages the ISA IRQs (0-15). * Locate the IOAPIC that manages the ISA IRQs (0-15). Loading include/asm-x86_64/mpspec.h +1 −7 Original line number Original line Diff line number Diff line Loading @@ -159,13 +159,7 @@ struct mpc_config_lintsrc #define MAX_MP_BUSSES 256 #define MAX_MP_BUSSES 256 /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) enum mp_bustype { extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); MP_BUS_ISA = 1, MP_BUS_EISA, MP_BUS_PCI, MP_BUS_MCA }; extern unsigned char mp_bus_id_to_type [MAX_MP_BUSSES]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern unsigned int boot_cpu_physical_apicid; extern unsigned int boot_cpu_physical_apicid; Loading Loading
arch/x86_64/kernel/io_apic.c +22 −70 Original line number Original line Diff line number Diff line Loading @@ -308,7 +308,7 @@ static int __init find_isa_irq_pin(int irq, int type) for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) { int lbus = mp_irqs[i].mpc_srcbus; int lbus = mp_irqs[i].mpc_srcbus; if (mp_bus_id_to_type[lbus] == MP_BUS_ISA && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_srcbusirq == irq)) (mp_irqs[i].mpc_srcbusirq == irq)) Loading @@ -324,7 +324,7 @@ static int __init find_isa_irq_apic(int irq, int type) for (i = 0; i < mp_irq_entries; i++) { for (i = 0; i < mp_irq_entries; i++) { int lbus = mp_irqs[i].mpc_srcbus; int lbus = mp_irqs[i].mpc_srcbus; if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA) && if (test_bit(lbus, mp_bus_not_pci) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_irqtype == type) && (mp_irqs[i].mpc_srcbusirq == irq)) (mp_irqs[i].mpc_srcbusirq == irq)) break; break; Loading Loading @@ -364,7 +364,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) mp_irqs[i].mpc_dstapic == MP_APIC_ALL) mp_irqs[i].mpc_dstapic == MP_APIC_ALL) break; break; if ((mp_bus_id_to_type[lbus] == MP_BUS_PCI) && if (!test_bit(lbus, mp_bus_not_pci) && !mp_irqs[i].mpc_irqtype && !mp_irqs[i].mpc_irqtype && (bus == lbus) && (bus == lbus) && (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { Loading Loading @@ -410,28 +410,11 @@ static int __init MPBIOS_polarity(int idx) switch (mp_irqs[idx].mpc_irqflag & 3) switch (mp_irqs[idx].mpc_irqflag & 3) { { case 0: /* conforms, ie. bus-type dependent polarity */ case 0: /* conforms, ie. bus-type dependent polarity */ { if (test_bit(bus, mp_bus_not_pci)) switch (mp_bus_id_to_type[bus]) { case MP_BUS_ISA: /* ISA pin */ { polarity = default_ISA_polarity(idx); polarity = default_ISA_polarity(idx); break; else } case MP_BUS_PCI: /* PCI pin */ { polarity = default_PCI_polarity(idx); polarity = default_PCI_polarity(idx); break; break; } default: { printk(KERN_WARNING "broken BIOS!!\n"); polarity = 1; break; } } break; } case 1: /* high active */ case 1: /* high active */ { { polarity = 0; polarity = 0; Loading Loading @@ -469,28 +452,11 @@ static int MPBIOS_trigger(int idx) switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) { { case 0: /* conforms, ie. bus-type dependent */ case 0: /* conforms, ie. bus-type dependent */ { if (test_bit(bus, mp_bus_not_pci)) switch (mp_bus_id_to_type[bus]) { case MP_BUS_ISA: /* ISA pin */ { trigger = default_ISA_trigger(idx); trigger = default_ISA_trigger(idx); break; else } case MP_BUS_PCI: /* PCI pin */ { trigger = default_PCI_trigger(idx); trigger = default_PCI_trigger(idx); break; break; } default: { printk(KERN_WARNING "broken BIOS!!\n"); trigger = 1; break; } } break; } case 1: /* edge */ case 1: /* edge */ { { trigger = 0; trigger = 0; Loading Loading @@ -596,15 +562,9 @@ static int pin_2_irq(int idx, int apic, int pin) if (mp_irqs[idx].mpc_dstirq != pin) if (mp_irqs[idx].mpc_dstirq != pin) printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); printk(KERN_ERR "broken BIOS or MPTABLE parser, ayiee!!\n"); switch (mp_bus_id_to_type[bus]) if (test_bit(bus, mp_bus_not_pci)) { { case MP_BUS_ISA: /* ISA pin */ { irq = mp_irqs[idx].mpc_srcbusirq; irq = mp_irqs[idx].mpc_srcbusirq; break; } else { } case MP_BUS_PCI: /* PCI pin */ { /* /* * PCI IRQs are mapped in order * PCI IRQs are mapped in order */ */ Loading @@ -613,14 +573,6 @@ static int pin_2_irq(int idx, int apic, int pin) irq += nr_ioapic_registers[i++]; irq += nr_ioapic_registers[i++]; irq += pin; irq += pin; irq = gsi_irq_sharing(irq); irq = gsi_irq_sharing(irq); break; } default: { printk(KERN_ERR "unknown bus type %d.\n",bus); irq = 0; break; } } } BUG_ON(irq >= NR_IRQS); BUG_ON(irq >= NR_IRQS); return irq; return irq; Loading
arch/x86_64/kernel/mpparse.c +4 −5 Original line number Original line Diff line number Diff line Loading @@ -42,7 +42,7 @@ int acpi_found_madt; * MP-table. * MP-table. */ */ unsigned char apic_version [MAX_APICS]; unsigned char apic_version [MAX_APICS]; unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; static int mp_current_pci_id = 0; static int mp_current_pci_id = 0; Loading Loading @@ -173,9 +173,9 @@ static void __init MP_bus_info (struct mpc_config_bus *m) Dprintk("Bus #%d is %s\n", m->mpc_busid, str); Dprintk("Bus #%d is %s\n", m->mpc_busid, str); if (strncmp(str, "ISA", 3) == 0) { if (strncmp(str, "ISA", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; set_bit(m->mpc_busid, mp_bus_not_pci); } else if (strncmp(str, "PCI", 3) == 0) { } else if (strncmp(str, "PCI", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; clear_bit(m->mpc_busid, mp_bus_not_pci); mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; mp_bus_id_to_pci_bus[m->mpc_busid] = mp_current_pci_id; mp_current_pci_id++; mp_current_pci_id++; } else { } else { Loading Loading @@ -808,8 +808,7 @@ void __init mp_config_acpi_legacy_irqs (void) /* /* * Fabricate the legacy ISA bus (bus #31). * Fabricate the legacy ISA bus (bus #31). */ */ mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA; set_bit(MP_ISA_BUS, mp_bus_not_pci); Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); /* /* * Locate the IOAPIC that manages the ISA IRQs (0-15). * Locate the IOAPIC that manages the ISA IRQs (0-15). Loading
include/asm-x86_64/mpspec.h +1 −7 Original line number Original line Diff line number Diff line Loading @@ -159,13 +159,7 @@ struct mpc_config_lintsrc #define MAX_MP_BUSSES 256 #define MAX_MP_BUSSES 256 /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) enum mp_bustype { extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); MP_BUS_ISA = 1, MP_BUS_EISA, MP_BUS_PCI, MP_BUS_MCA }; extern unsigned char mp_bus_id_to_type [MAX_MP_BUSSES]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern unsigned int boot_cpu_physical_apicid; extern unsigned int boot_cpu_physical_apicid; Loading