diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2010-03-30 04:07:03 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-04 16:34:27 -0400 |
commit | 9a0a91bb56d2915cdb8585717de38376ad20fef9 (patch) | |
tree | 207c5f72fc4f4edc623db1e4440c5325a17ba120 /arch/x86 | |
parent | 2c2df8418ac7908eec4558407b83f16739006c54 (diff) |
x86, acpi/irq: Teach acpi_get_override_irq to take a gsi not an isa_irq
In perverse acpi implementations the isa irqs are not identity mapped
to the first 16 gsi. Furthermore at least the extended interrupt
resource capability may return gsi's and not isa irqs. So since
what we get from acpi is a gsi teach acpi_get_overrride_irq to
operate on a gsi instead of an isa_irq.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <1269936436-7039-2-git-send-email-ebiederm@xmission.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86')
-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 | ||