diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-03-21 09:32:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:21 -0400 |
commit | 6e908947b4995bc0e551a8257c586d5c3e428201 (patch) | |
tree | 62eeef1df8d45b4d02d69a235a472b31024de46d /arch/x86/kernel/io_apic_32.c | |
parent | f2e576b8141ec1cf2669ff7bbc92f0a9c147f34f (diff) |
x86: fix ioapic bug again
un-revert:
commit 4960c9df1407c2723459c60ff13e6efe0c209c62
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue Jan 22 10:23:01 2008 +0100
Revert "x86: fix NMI watchdog & 'stopped time' problem"
This reverts commit d4d25deca49ec2527a634557bf5a6cf449f85deb.
needs a proper fix though ...
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_32.c')
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 742fab45e1c6..8ed6eb967652 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2124,10 +2124,14 @@ static inline void __init check_timer(void) | |||
2124 | { | 2124 | { |
2125 | int apic1, pin1, apic2, pin2; | 2125 | int apic1, pin1, apic2, pin2; |
2126 | int vector; | 2126 | int vector; |
2127 | unsigned int ver; | ||
2127 | unsigned long flags; | 2128 | unsigned long flags; |
2128 | 2129 | ||
2129 | local_irq_save(flags); | 2130 | local_irq_save(flags); |
2130 | 2131 | ||
2132 | ver = apic_read(APIC_LVR); | ||
2133 | ver = GET_APIC_VERSION(ver); | ||
2134 | |||
2131 | /* | 2135 | /* |
2132 | * get/set the timer IRQ vector: | 2136 | * get/set the timer IRQ vector: |
2133 | */ | 2137 | */ |
@@ -2140,11 +2144,15 @@ static inline void __init check_timer(void) | |||
2140 | * mode for the 8259A whenever interrupts are routed | 2144 | * mode for the 8259A whenever interrupts are routed |
2141 | * through I/O APICs. Also IRQ0 has to be enabled in | 2145 | * through I/O APICs. Also IRQ0 has to be enabled in |
2142 | * the 8259A which implies the virtual wire has to be | 2146 | * the 8259A which implies the virtual wire has to be |
2143 | * disabled in the local APIC. | 2147 | * disabled in the local APIC. Finally timer interrupts |
2148 | * need to be acknowledged manually in the 8259A for | ||
2149 | * timer_interrupt() and for the i82489DX when using | ||
2150 | * the NMI watchdog. | ||
2144 | */ | 2151 | */ |
2145 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2152 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2146 | init_8259A(1); | 2153 | init_8259A(1); |
2147 | timer_ack = 1; | 2154 | timer_ack = !cpu_has_tsc; |
2155 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2148 | if (timer_over_8254 > 0) | 2156 | if (timer_over_8254 > 0) |
2149 | enable_8259A_irq(0); | 2157 | enable_8259A_irq(0); |
2150 | 2158 | ||