[PATCH 2/4] perf_counter: fix nmi-watchdog interaction
From: Peter Zijlstra
Date: Fri May 01 2009 - 06:26:38 EST
When we don't have any perf-counters active, don't act like we know
what the NMI is for.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
arch/x86/kernel/cpu/perf_counter.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6/arch/x86/kernel/cpu/perf_counter.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_counter.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_counter.c
@@ -891,6 +891,9 @@ perf_counter_nmi_handler(struct notifier
struct pt_regs *regs;
int ret;
+ if (!atomic_read(&num_counters))
+ return NOTIFY_DONE;
+
switch (cmd) {
case DIE_NMI:
case DIE_NMI_IPI:
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/