diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 127b8718abfb..73ec92838d83 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -4082,22 +4082,27 @@ int __init io_apic_get_version(int ioapic) | |||
4082 | return reg_01.bits.version; | 4082 | return reg_01.bits.version; |
4083 | } | 4083 | } |
4084 | 4084 | ||
4085 | int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | 4085 | int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity) |
4086 | { | 4086 | { |
4087 | int i; | 4087 | int ioapic, pin, idx; |
4088 | 4088 | ||
4089 | if (skip_ioapic_setup) | 4089 | if (skip_ioapic_setup) |
4090 | return -1; | 4090 | return -1; |
4091 | 4091 | ||
4092 | for (i = 0; i < mp_irq_entries; i++) | 4092 | ioapic = mp_find_ioapic(gsi); |
4093 | if (mp_irqs[i].irqtype == mp_INT && | 4093 | if (ioapic < 0) |
4094 | mp_irqs[i].srcbusirq == bus_irq) | 4094 | return -1; |
4095 | break; | 4095 | |
4096 | if (i >= mp_irq_entries) | 4096 | pin = mp_find_ioapic_pin(ioapic, gsi); |
4097 | if (pin < 0) | ||
4098 | return -1; | ||
4099 | |||
4100 | idx = find_irq_entry(ioapic, pin, mp_INT); | ||
4101 | if (idx < 0) | ||
4097 | return -1; | 4102 | return -1; |
4098 | 4103 | ||
4099 | *trigger = irq_trigger(i); | 4104 | *trigger = irq_trigger(idx); |
4100 | *polarity = irq_polarity(i); | 4105 | *polarity = irq_polarity(idx); |
4101 | return 0; | 4106 | return 0; |
4102 | } | 4107 | } |
4103 | 4108 | ||