diff options
author | Shaohua Li <shaohua.li@intel.com> | 2007-11-17 01:05:28 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-11-20 01:16:29 -0500 |
commit | 61fd47e0c84764f49b4e52bfd8170fac52636f00 (patch) | |
tree | c94c7b8c43dee4bb123900f49ef781607ee0d6fb /arch/x86/kernel/io_apic_64.c | |
parent | f0714d20234062bd0a8f49a6b32f7d1d7f3c2943 (diff) |
ACPI: fix two IRQ8 issues in IOAPIC mode
Use mp_irqs[] to get PNP device's interrupt polarity and trigger.
There are two reasons to do this:
1. BIOS bug for PNP interrupt
2. BIOS explictly does override
mp_irqs[] should cover all the cases.
http://bugzilla.kernel.org/show_bug.cgi?id=5243
http://bugzilla.kernel.org/show_bug.cgi?id=7679
http://bugzilla.kernel.org/show_bug.cgi?id=9153
[lenb: fixed !IOAPIC and 64-bit !SMP builds]
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 953328b55a30..435a8c9b55f8 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -546,7 +546,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) | |||
546 | #define default_PCI_trigger(idx) (1) | 546 | #define default_PCI_trigger(idx) (1) |
547 | #define default_PCI_polarity(idx) (1) | 547 | #define default_PCI_polarity(idx) (1) |
548 | 548 | ||
549 | static int __init MPBIOS_polarity(int idx) | 549 | static int MPBIOS_polarity(int idx) |
550 | { | 550 | { |
551 | int bus = mp_irqs[idx].mpc_srcbus; | 551 | int bus = mp_irqs[idx].mpc_srcbus; |
552 | int polarity; | 552 | int polarity; |
@@ -2222,8 +2222,27 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p | |||
2222 | return 0; | 2222 | return 0; |
2223 | } | 2223 | } |
2224 | 2224 | ||
2225 | #endif /* CONFIG_ACPI */ | ||
2226 | 2225 | ||
2226 | int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | ||
2227 | { | ||
2228 | int i; | ||
2229 | |||
2230 | if (skip_ioapic_setup) | ||
2231 | return -1; | ||
2232 | |||
2233 | for (i = 0; i < mp_irq_entries; i++) | ||
2234 | if (mp_irqs[i].mpc_irqtype == mp_INT && | ||
2235 | mp_irqs[i].mpc_srcbusirq == bus_irq) | ||
2236 | break; | ||
2237 | if (i >= mp_irq_entries) | ||
2238 | return -1; | ||
2239 | |||
2240 | *trigger = irq_trigger(i); | ||
2241 | *polarity = irq_polarity(i); | ||
2242 | return 0; | ||
2243 | } | ||
2244 | |||
2245 | #endif /* CONFIG_ACPI */ | ||
2227 | 2246 | ||
2228 | /* | 2247 | /* |
2229 | * This function currently is only a helper for the i386 smp boot process where | 2248 | * This function currently is only a helper for the i386 smp boot process where |
@@ -2260,3 +2279,4 @@ void __init setup_ioapic_dest(void) | |||
2260 | } | 2279 | } |
2261 | } | 2280 | } |
2262 | #endif | 2281 | #endif |
2282 | |||