projects/linux·commit faa4cfa6

i386: fix NMI watchdog not reserving its MSRs

faa4cfa6 · Björn Steinbrink <[email protected]> · 2007-06-16 10:15:55 -07:00

At system boot time, the NMI watchdog no longer reserved its MSRs, allowing
other subsystems to mess with them.  Fix that.

Signed-off-by: Björn Steinbrink <[email protected]>
Cc: Andi Kleen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
faa4cfa6b334fc07c3386e620a2fb55de508c077
Parents
38ad2ed0

Changes

1 files changed · +6 −0

FileStatusAddDelContent
arch/i386/kernel/cpu/perfctr-watchdog.cmodified+6−0View file

arch/i386/kernel/cpu/perfctr-watchdog.c

View file
diff --git a/arch/i386/kernel/cpu/perfctr-watchdog.c b/arch/i386/kernel/cpu/perfctr-watchdog.c
index 2b04c8f..8343244 100644
--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -614,6 +614,12 @@ int lapic_watchdog_init(unsigned nmi_hz)
probe_nmi_watchdog();
if (!wd_ops)
return -1;
+
+ if (!wd_ops->reserve()) {
+ printk(KERN_ERR
+ "NMI watchdog: cannot reserve perfctrs\n");
+ return -1;
+ }
}
if (!(wd_ops->setup(nmi_hz))) {