From: Maciej W. Rozycki Date: Wed, 21 May 2008 21:09:34 +0000 (+0100) Subject: x86: I/O APIC: keep IRQ off when changing LVT registers X-Git-Tag: v2.6.27-rc1~1106^2~251^2~30 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60134ebe795b728dbb960485a8e873c3250ada36;p=linux-2.6 x86: I/O APIC: keep IRQ off when changing LVT registers Disable the 8259A acting in the "virtual wire" mode to keep the interrupt line inactive while fiddling with local APIC interrupt vector registers associated with its destination inputs. To be on the safe side, especially concerning flipping the trigger mode. Signed-off-by: Maciej W. Rozycki Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index e7b7655c4e..41218ac75d 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c @@ -2199,7 +2199,9 @@ static inline void __init check_timer(void) else add_pin_to_irq(0, apic2, pin2); if (nmi_watchdog == NMI_IO_APIC) { + disable_8259A_irq(0); setup_nmi(); + enable_8259A_irq(0); } goto out; } diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 6433fc99f1..aa45a85c4d 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c @@ -1702,7 +1702,9 @@ static inline void __init check_timer(void) apic_printk(APIC_VERBOSE," works.\n"); nmi_watchdog_default(); if (nmi_watchdog == NMI_IO_APIC) { + disable_8259A_irq(0); setup_nmi(); + enable_8259A_irq(0); } goto out; }