mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH perf/core/urgent] perf, x86: Handle in flight IRQs on P4 platform
@ 2010-09-30  3:01 Don Zickus
  2010-10-04 20:25 ` [tip:perf/urgent] perf, x86: Handle in flight NMIs " tip-bot for Cyrill Gorcunov
  0 siblings, 1 reply; 2+ messages in thread
From: Don Zickus @ 2010-09-30  3:01 UTC (permalink / raw)
  To: mingo
  Cc: linux-kernel, fweisbec, peterz, Cyrill Gorcunov, Cyrill Gorcunov,
	Robert Richter, Lin Ming, Don Zickus

From: Cyrill Gorcunov <gorcunov@gmail.com>

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 ]

Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Robert Richter <robert.richter@amd.com>
CC: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 arch/x86/kernel/cpu/perf_event_p4.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index b560db3..2490151 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -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;
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-04 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30  3:01 [PATCH perf/core/urgent] perf, x86: Handle in flight IRQs on P4 platform Don Zickus
2010-10-04 20:25 ` [tip:perf/urgent] perf, x86: Handle in flight NMIs " tip-bot for Cyrill Gorcunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome