public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] perf, x86: P4 PMU - Add missing read of a counter before test
@ 2011-03-24  8:29 Cyrill Gorcunov
  2011-03-24  8:48 ` Ingo Molnar
  2011-03-24 12:28 ` Don Zickus
  0 siblings, 2 replies; 13+ messages in thread
From: Cyrill Gorcunov @ 2011-03-24  8:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Lin Ming, Don Zickus, Linux kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

Don, I've added yours SOB, ok? (The patch is attached to avoid
space/tabs problem
due to web-mail client)

[-- Attachment #2: perf-x86-p4-pmu-unflagged --]
[-- Type: application/octet-stream, Size: 896 bytes --]

From: Don Zickus <dzickus@redhat.com>
Subject: [PATCH -tip] perf, x86: P4 PMU - Add missing read of a counter before test

The read of real MSR register was missed before
if () clause which leads that test never success.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 arch/x86/kernel/cpu/perf_event_p4.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.tip/arch/x86/kernel/cpu/perf_event_p4.c
===================================================================
--- linux-2.6.tip.orig/arch/x86/kernel/cpu/perf_event_p4.c
+++ linux-2.6.tip/arch/x86/kernel/cpu/perf_event_p4.c
@@ -777,6 +777,7 @@ static inline int p4_pmu_clear_cccr_ovf(
 	 * the counter has reached zero value and continued counting before
 	 * real NMI signal was received:
 	 */
+	rdmsrl(hwc->event_base, v);
 	if (!(v & ARCH_P4_UNFLAGGED_BIT))
 		return 1;
 

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

end of thread, other threads:[~2011-03-24 20:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  8:29 [PATCH -tip] perf, x86: P4 PMU - Add missing read of a counter before test Cyrill Gorcunov
2011-03-24  8:48 ` Ingo Molnar
2011-03-24  9:33   ` Cyrill Gorcunov
2011-03-24 15:38   ` Cyrill Gorcunov
2011-03-24 16:33     ` Ingo Molnar
2011-03-24 16:46       ` Cyrill Gorcunov
2011-03-24 16:47         ` Cyrill Gorcunov
2011-03-24 16:51         ` Ingo Molnar
2011-03-24 17:06           ` Cyrill Gorcunov
2011-03-24 18:22         ` Don Zickus
2011-03-24 18:26           ` Cyrill Gorcunov
2011-03-24 20:03             ` Ingo Molnar
2011-03-24 12:28 ` Don Zickus

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