Skip to contentSkip to conversation

perf, x86: Handle in flight IRQs on P4 platform

PATCH In review Don Zickus 2 participants 2 messages Sep 30, 2010 – Oct 4, 2010

Subsystems (2)
lore
Share & tools
lore

Don Zickus

author
#0 lore raw

PATCH 1/1 perf, x86: Handle in flight IRQs on P4 platform

From: Cyrill Gorcunov <[email protected]>

Stephane reported we've forgot to guard the P4 platform against spurious in-flight performance IRQs. Fix it.

[ the patch is a complement to commit 63e6be6d98e1 ]

---
 arch/x86/kernel/cpu/perf_event_p4.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
arch/x86/kernel/cpu/perf_event_p4.c +5 -1
index b560db3..2490151 100644
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
 	for (idx = 0; idx < x86_pmu.num_counters; idx++) {
 		int overflow;
 
-		if (!test_bit(idx, cpuc->active_mask))
+		if (!test_bit(idx, cpuc->active_mask)) {
+			/* catch in-flight IRQs */
+			if (__test_and_clear_bit(idx, cpuc->running))
+				handled++;
 			continue;
+		}
 
 		event = cpuc->events[idx];
 		hwc = &event->hw;
Signature · 1 line
1.7.2.3
#1 lore raw

[tip:perf/urgent] perf, x86: Handle in flight NMIs on P4 platform

Commit-ID:  03e22198d2379ffa746c9ea332fbb1f094f9423b
Gitweb:     http://git.kernel.org/tip/03e22198d2379ffa746c9ea332fbb1f094f9423b
Author:     Cyrill Gorcunov <[email protected]>
AuthorDate: Wed, 29 Sep 2010 23:01:38 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 30 Sep 2010 09:17:59 +0200

perf, x86: Handle in flight NMIs on P4 platform

Stephane reported we've forgot to guard the P4 platform against spurious in-flight performance IRQs. Fix it.

This fixes potential spurious 'dazed and confused' NMI messages.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/perf_event_p4.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
arch/x86/kernel/cpu/perf_event_p4.c +5 -1
index b560db3..2490151 100644
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
 	for (idx = 0; idx < x86_pmu.num_counters; idx++) {
 		int overflow;
 
-		if (!test_bit(idx, cpuc->active_mask))
+		if (!test_bit(idx, cpuc->active_mask)) {
+			/* catch in-flight IRQs */
+			if (__test_and_clear_bit(idx, cpuc->running))
+				handled++;
 			continue;
+		}
 
 		event = cpuc->events[idx];
 		hwc = &event->hw;