diff options
author | Maciej W. Rozycki <macro@ds2.pg.gda.pl> | 2007-11-26 14:42:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-11-26 14:42:19 -0500 |
commit | d4d25deca49ec2527a634557bf5a6cf449f85deb (patch) | |
tree | 4148e6ac0438ff7dfb984591e7126e27538b16d2 /arch/x86/kernel/io_apic_32.c | |
parent | 2ffbb8377c7a0713baf6644e285adc27a5654582 (diff) |
x86: fix NMI watchdog & 'stopped time' problem
More than 3 years ago Niclas Gustafsson reported a 'stopped time'
problem:
> Watching the /proc/interrupts with 10s apart after the "stop".
>
> [root@s151 root]# more /proc/interrupts
> CPU0
> 0: 66413955 local-APIC-edge timer
[...]
> LOC: 67355837
> ERR: 0
> MIS: 0
> [root@s151 root]# more /proc/interrupts
> CPU0
> 0: 66413955 local-APIC-edge timer
[...]
> LOC: 67379568
> ERR: 0
> MIS: 0
This may be because buggy SMM firmware messes with the 8259A (configured
for a transparent mode -- yes that rare "local-APIC-edge" mode is tricky
;-) ) insanely.
this should resolve:
http://bugzilla.kernel.org/show_bug.cgi?id=2544
http://bugzilla.kernel.org/show_bug.cgi?id=6296
Patch-dusted-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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 f35c6eb33da9..fc4bbc1d1331 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2166,6 +2166,10 @@ static inline void __init check_timer(void) | |||
2166 | { | 2166 | { |
2167 | int apic1, pin1, apic2, pin2; | 2167 | int apic1, pin1, apic2, pin2; |
2168 | int vector; | 2168 | int vector; |
2169 | unsigned int ver; | ||
2170 | |||
2171 | ver = apic_read(APIC_LVR); | ||
2172 | ver = GET_APIC_VERSION(ver); | ||
2169 | 2173 | ||
2170 | /* | 2174 | /* |
2171 | * get/set the timer IRQ vector: | 2175 | * get/set the timer IRQ vector: |
@@ -2179,11 +2183,15 @@ static inline void __init check_timer(void) | |||
2179 | * mode for the 8259A whenever interrupts are routed | 2183 | * mode for the 8259A whenever interrupts are routed |
2180 | * through I/O APICs. Also IRQ0 has to be enabled in | 2184 | * through I/O APICs. Also IRQ0 has to be enabled in |
2181 | * the 8259A which implies the virtual wire has to be | 2185 | * the 8259A which implies the virtual wire has to be |
2182 | * disabled in the local APIC. | 2186 | * disabled in the local APIC. Finally timer interrupts |
2187 | * need to be acknowledged manually in the 8259A for | ||
2188 | * timer_interrupt() and for the i82489DX when using | ||
2189 | * the NMI watchdog. | ||
2183 | */ | 2190 | */ |
2184 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2191 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2185 | init_8259A(1); | 2192 | init_8259A(1); |
2186 | timer_ack = 1; | 2193 | timer_ack = !cpu_has_tsc; |
2194 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2187 | if (timer_over_8254 > 0) | 2195 | if (timer_over_8254 > 0) |
2188 | enable_8259A_irq(0); | 2196 | enable_8259A_irq(0); |
2189 | 2197 | ||