aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/nmi_32.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@ds2.pg.gda.pl>2007-11-26 14:42:19 -0500
committerIngo Molnar <mingo@elte.hu>2007-11-26 14:42:19 -0500
commitd4d25deca49ec2527a634557bf5a6cf449f85deb (patch)
tree4148e6ac0438ff7dfb984591e7126e27538b16d2 /arch/x86/kernel/nmi_32.c
parent2ffbb8377c7a0713baf6644e285adc27a5654582 (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/nmi_32.c')
-rw-r--r--arch/x86/kernel/nmi_32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index 600fd404e440..f5cc47c60b13 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -25,6 +25,7 @@
25 25
26#include <asm/smp.h> 26#include <asm/smp.h>
27#include <asm/nmi.h> 27#include <asm/nmi.h>
28#include <asm/timer.h>
28 29
29#include "mach_traps.h" 30#include "mach_traps.h"
30 31
@@ -83,7 +84,7 @@ static int __init check_nmi_watchdog(void)
83 84
84 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); 85 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
85 if (!prev_nmi_count) 86 if (!prev_nmi_count)
86 return -1; 87 goto error;
87 88
88 printk(KERN_INFO "Testing NMI watchdog ... "); 89 printk(KERN_INFO "Testing NMI watchdog ... ");
89 90
@@ -117,7 +118,7 @@ static int __init check_nmi_watchdog(void)
117 if (!atomic_read(&nmi_active)) { 118 if (!atomic_read(&nmi_active)) {
118 kfree(prev_nmi_count); 119 kfree(prev_nmi_count);
119 atomic_set(&nmi_active, -1); 120 atomic_set(&nmi_active, -1);
120 return -1; 121 goto error;
121 } 122 }
122 printk("OK.\n"); 123 printk("OK.\n");
123 124
@@ -128,6 +129,10 @@ static int __init check_nmi_watchdog(void)
128 129
129 kfree(prev_nmi_count); 130 kfree(prev_nmi_count);
130 return 0; 131 return 0;
132error:
133 timer_ack = !cpu_has_tsc;
134
135 return -1;
131} 136}
132/* This needs to happen later in boot so counters are working */ 137/* This needs to happen later in boot so counters are working */
133late_initcall(check_nmi_watchdog); 138late_initcall(check_nmi_watchdog);