diff options
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 72ac2a332993..97e1e3ec2edf 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1475,7 +1475,7 @@ static struct { | |||
1475 | 1475 | ||
1476 | static void __init setup_IO_APIC_irqs(void) | 1476 | static void __init setup_IO_APIC_irqs(void) |
1477 | { | 1477 | { |
1478 | int apic_id = 0, pin, idx, irq; | 1478 | int apic_id, pin, idx, irq; |
1479 | int notcon = 0; | 1479 | int notcon = 0; |
1480 | struct irq_desc *desc; | 1480 | struct irq_desc *desc; |
1481 | struct irq_cfg *cfg; | 1481 | struct irq_cfg *cfg; |
@@ -1483,14 +1483,7 @@ static void __init setup_IO_APIC_irqs(void) | |||
1483 | 1483 | ||
1484 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); | 1484 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); |
1485 | 1485 | ||
1486 | #ifdef CONFIG_ACPI | 1486 | for (apic_id = 0; apic_id < nr_ioapics; apic_id++) |
1487 | if (!acpi_disabled && acpi_ioapic) { | ||
1488 | apic_id = mp_find_ioapic(0); | ||
1489 | if (apic_id < 0) | ||
1490 | apic_id = 0; | ||
1491 | } | ||
1492 | #endif | ||
1493 | |||
1494 | for (pin = 0; pin < nr_ioapic_registers[apic_id]; pin++) { | 1487 | for (pin = 0; pin < nr_ioapic_registers[apic_id]; pin++) { |
1495 | idx = find_irq_entry(apic_id, pin, mp_INT); | 1488 | idx = find_irq_entry(apic_id, pin, mp_INT); |
1496 | if (idx == -1) { | 1489 | if (idx == -1) { |
@@ -1512,6 +1505,9 @@ static void __init setup_IO_APIC_irqs(void) | |||
1512 | 1505 | ||
1513 | irq = pin_2_irq(idx, apic_id, pin); | 1506 | irq = pin_2_irq(idx, apic_id, pin); |
1514 | 1507 | ||
1508 | if ((apic_id > 0) && (irq > 16)) | ||
1509 | continue; | ||
1510 | |||
1515 | /* | 1511 | /* |
1516 | * Skip the timer IRQ if there's a quirk handler | 1512 | * Skip the timer IRQ if there's a quirk handler |
1517 | * installed and if it returns 1: | 1513 | * installed and if it returns 1: |
@@ -4105,27 +4101,23 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | |||
4105 | #ifdef CONFIG_SMP | 4101 | #ifdef CONFIG_SMP |
4106 | void __init setup_ioapic_dest(void) | 4102 | void __init setup_ioapic_dest(void) |
4107 | { | 4103 | { |
4108 | int pin, ioapic = 0, irq, irq_entry; | 4104 | int pin, ioapic, irq, irq_entry; |
4109 | struct irq_desc *desc; | 4105 | struct irq_desc *desc; |
4110 | const struct cpumask *mask; | 4106 | const struct cpumask *mask; |
4111 | 4107 | ||
4112 | if (skip_ioapic_setup == 1) | 4108 | if (skip_ioapic_setup == 1) |
4113 | return; | 4109 | return; |
4114 | 4110 | ||
4115 | #ifdef CONFIG_ACPI | 4111 | for (ioapic = 0; ioapic < nr_ioapics; ioapic++) |
4116 | if (!acpi_disabled && acpi_ioapic) { | ||
4117 | ioapic = mp_find_ioapic(0); | ||
4118 | if (ioapic < 0) | ||
4119 | ioapic = 0; | ||
4120 | } | ||
4121 | #endif | ||
4122 | |||
4123 | for (pin = 0; pin < nr_ioapic_registers[ioapic]; pin++) { | 4112 | for (pin = 0; pin < nr_ioapic_registers[ioapic]; pin++) { |
4124 | irq_entry = find_irq_entry(ioapic, pin, mp_INT); | 4113 | irq_entry = find_irq_entry(ioapic, pin, mp_INT); |
4125 | if (irq_entry == -1) | 4114 | if (irq_entry == -1) |
4126 | continue; | 4115 | continue; |
4127 | irq = pin_2_irq(irq_entry, ioapic, pin); | 4116 | irq = pin_2_irq(irq_entry, ioapic, pin); |
4128 | 4117 | ||
4118 | if ((ioapic > 0) && (irq > 16)) | ||
4119 | continue; | ||
4120 | |||
4129 | desc = irq_to_desc(irq); | 4121 | desc = irq_to_desc(irq); |
4130 | 4122 | ||
4131 | /* | 4123 | /* |