diff options
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 23 | ||||
-rw-r--r-- | include/linux/acpi.h | 4 |
2 files changed, 16 insertions, 11 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 | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 7a937dabcc4a..3da73f5f0ae9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -119,9 +119,9 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | |||
119 | int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); | 119 | int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); |
120 | 120 | ||
121 | #ifdef CONFIG_X86_IO_APIC | 121 | #ifdef CONFIG_X86_IO_APIC |
122 | extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | 122 | extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity); |
123 | #else | 123 | #else |
124 | #define acpi_get_override_irq(bus, trigger, polarity) (-1) | 124 | #define acpi_get_override_irq(gsi, trigger, polarity) (-1) |
125 | #endif | 125 | #endif |
126 | /* | 126 | /* |
127 | * This function undoes the effect of one call to acpi_register_gsi(). | 127 | * This function undoes the effect of one call to acpi_register_gsi(). |