aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-07-22 05:12:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-22 14:03:38 -0400
commit57c22f49e4c7d27a03e109a317c30b12f1bae0b2 (patch)
tree093eb013114e2906cca0f7b6524c0b506adf5833 /arch/i386
parentf25f64ed5bd3c2932493681bdfdb483ea707da0a (diff)
i386: Handle P6s without performance counters in nmi watchdog
I got an oops while booting a 32bit kernel on KVM because it doesn't implement performance counters used by the NMI watchdog. Handle this case. Cc: Avi Kivity <avi@qumranet.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/cpu/perfctr-watchdog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index 30b5e48aa76b..572900398def 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -346,7 +346,9 @@ static int setup_p6_watchdog(unsigned nmi_hz)
346 perfctr_msr = MSR_P6_PERFCTR0; 346 perfctr_msr = MSR_P6_PERFCTR0;
347 evntsel_msr = MSR_P6_EVNTSEL0; 347 evntsel_msr = MSR_P6_EVNTSEL0;
348 348
349 wrmsrl(perfctr_msr, 0UL); 349 /* KVM doesn't implement this MSR */
350 if (wrmsr_safe(perfctr_msr, 0, 0) < 0)
351 return 0;
350 352
351 evntsel = P6_EVNTSEL_INT 353 evntsel = P6_EVNTSEL_INT
352 | P6_EVNTSEL_OS 354 | P6_EVNTSEL_OS