x86, ioapic, acpi: add a knob to disable IRQ 0 through I/O APIC
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 1 Jul 2008 00:11:35 +0000 (01:11 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 09:10:32 +0000 (11:10 +0200)
As discovered recently some systems exhibit problems when the 8254 timer
IRQ is routed through the I/O APIC.  These problems do not affect the
timer IRQ itself and therefore cannot be detected when the correctness of
operation of the interrupt is verified in check_timer().  Therefore the
I/O APIC path of the timer IRQ has to be disabled entirely.

This is a change that lets platforms ask for the timer IRQ not to be
registered in the I/O APIC interrupt tables.  The local APIC and ExtINTA
paths are unaffected.  This request is only taken into account for ACPI
platforms as MP table systems seem unaffected so far.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/acpi/boot.c

index 91bb9a9..92a5426 100644 (file)
@@ -83,6 +83,8 @@ int acpi_lapic;
 int acpi_ioapic;
 int acpi_strict;
 
+static int disable_irq0_through_ioapic __initdata;
+
 u8 acpi_sci_flags __initdata;
 int acpi_sci_override_gsi __initdata;
 int acpi_skip_timer_override __initdata;
@@ -992,6 +994,10 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
        int pin;
        struct mp_config_intsrc mp_irq;
 
+       /* Skip the 8254 timer interrupt (IRQ 0) if requested.  */
+       if (bus_irq == 0 && disable_irq0_through_ioapic)
+               return;
+
        /*
         * Convert 'gsi' to 'ioapic.pin'.
         */
@@ -1058,6 +1064,10 @@ void __init mp_config_acpi_legacy_irqs(void)
        for (i = 0; i < 16; i++) {
                int idx;
 
+               /* Skip the 8254 timer interrupt (IRQ 0) if requested.  */
+               if (i == 0 && disable_irq0_through_ioapic)
+                       continue;
+
                for (idx = 0; idx < mp_irq_entries; idx++) {
                        struct mp_config_intsrc *irq = mp_irqs + idx;