aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorGOTO Masanori <gotom@sanori.org>2006-03-08 00:55:29 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-08 17:14:01 -0500
commitb884e25784f62a1c740d2e4c1ce19cb89644e986 (patch)
tree064045e9859cdf0c547d6be890d8a013e07104f9 /arch/i386
parent707ced0d718e89b52b13aa55a64653083e792cca (diff)
[PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi
Fix i386 nmi_watchdog that does not meet watchdog timeout condition. It does not hit die_nmi when it should be triggered, because the current nmi_watchdog_tick in arch/i386/kernel/nmi.c never count up alert_counter like this: void nmi_watchdog_tick (struct pt_regs * regs) { if (last_irq_sums[cpu] == sum) { alert_counter[cpu]++; <- count up alert_counter, but if (alert_counter[cpu] == 5*nmi_hz) die_nmi(regs, "NMI Watchdog detected LOCKUP"); alert_counter[cpu] = 0; <- reset alert_counter This patch changes it back to the previous and working version. This was found and originally written by Kohta NAKASHIMA. (akpm: also uninline write_watchdog_counter(), saving 184 byets) Signed-off-by: GOTO Masanori <gotom@sanori.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/nmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 63f39a7e2c96..be87c5e2ee95 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -357,7 +357,7 @@ static void clear_msr_range(unsigned int base, unsigned int n)
357 wrmsr(base+i, 0, 0); 357 wrmsr(base+i, 0, 0);
358} 358}
359 359
360static inline void write_watchdog_counter(const char *descr) 360static void write_watchdog_counter(const char *descr)
361{ 361{
362 u64 count = (u64)cpu_khz * 1000; 362 u64 count = (u64)cpu_khz * 1000;
363 363
@@ -544,7 +544,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
544 * die_nmi will return ONLY if NOTIFY_STOP happens.. 544 * die_nmi will return ONLY if NOTIFY_STOP happens..
545 */ 545 */
546 die_nmi(regs, "NMI Watchdog detected LOCKUP"); 546 die_nmi(regs, "NMI Watchdog detected LOCKUP");
547 547 } else {
548 last_irq_sums[cpu] = sum; 548 last_irq_sums[cpu] = sum;
549 alert_counter[cpu] = 0; 549 alert_counter[cpu] = 0;
550 } 550 }