aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_32.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2007-11-17 01:05:28 -0500
committerLen Brown <len.brown@intel.com>2007-11-20 01:16:29 -0500
commit61fd47e0c84764f49b4e52bfd8170fac52636f00 (patch)
treec94c7b8c43dee4bb123900f49ef781607ee0d6fb /arch/x86/kernel/io_apic_32.c
parentf0714d20234062bd0a8f49a6b32f7d1d7f3c2943 (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_32.c')
-rw-r--r--arch/x86/kernel/io_apic_32.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index f35c6eb33da9..6bb80ea5f4ee 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -962,7 +962,7 @@ static int EISA_ELCR(unsigned int irq)
962#define default_MCA_trigger(idx) (1) 962#define default_MCA_trigger(idx) (1)
963#define default_MCA_polarity(idx) (0) 963#define default_MCA_polarity(idx) (0)
964 964
965static int __init MPBIOS_polarity(int idx) 965static int MPBIOS_polarity(int idx)
966{ 966{
967 int bus = mp_irqs[idx].mpc_srcbus; 967 int bus = mp_irqs[idx].mpc_srcbus;
968 int polarity; 968 int polarity;
@@ -2830,6 +2830,25 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
2830 return 0; 2830 return 0;
2831} 2831}
2832 2832
2833int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
2834{
2835 int i;
2836
2837 if (skip_ioapic_setup)
2838 return -1;
2839
2840 for (i = 0; i < mp_irq_entries; i++)
2841 if (mp_irqs[i].mpc_irqtype == mp_INT &&
2842 mp_irqs[i].mpc_srcbusirq == bus_irq)
2843 break;
2844 if (i >= mp_irq_entries)
2845 return -1;
2846
2847 *trigger = irq_trigger(i);
2848 *polarity = irq_polarity(i);
2849 return 0;
2850}
2851
2833#endif /* CONFIG_ACPI */ 2852#endif /* CONFIG_ACPI */
2834 2853
2835static int __init parse_disable_timer_pin_1(char *arg) 2854static int __init parse_disable_timer_pin_1(char *arg)