mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][2.6.9-rc1-mm1] Prescott fix for perfctr
@ 2004-08-26 14:16 Mikael Pettersson
  0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2004-08-26 14:16 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Andrew,

This eliminates a potential oops in perfctr's x86 initialisation
code when running on a P4 Model 3 Prescott processor. The P4M3
removed two control registers. I knew that and handled it in the
control setup validation code, but I forgot to also modify the
initialisation code to avoid clearing them.

Perfctr hasn't been hit by this problem on the P4M3 Noconas,
but people are reporting that oprofile and the NMI watchdog
oops due to this on P4M3 Prescotts.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>

diff -ruN linux-2.6.9-rc1-mm1/drivers/perfctr/x86.c linux-2.6.9-rc1-mm1.perfctr-p4m3-fix/drivers/perfctr/x86.c
--- linux-2.6.9-rc1-mm1/drivers/perfctr/x86.c	2004-08-26 14:33:03.000000000 +0200
+++ linux-2.6.9-rc1-mm1.perfctr-p4m3-fix/drivers/perfctr/x86.c	2004-08-26 15:26:28.000000000 +0200
@@ -865,7 +865,10 @@
 	/* clear PEBS_ENABLE and PEBS_MATRIX_VERT; they handle both PEBS
 	   and ReplayTagging, and should exist even if PEBS is disabled */
 	clear_msr_range(0x3F1, 2);
-	clear_msr_range(0x3A0, 31);
+	clear_msr_range(0x3A0, 26);
+	if (p4_IQ_ESCR_ok)
+		clear_msr_range(0x3BA, 2);
+	clear_msr_range(0x3BC, 3);
 	clear_msr_range(0x3C0, 6);
 	clear_msr_range(0x3C8, 6);
 	clear_msr_range(0x3E0, 2);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-26 14:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-26 14:16 [PATCH][2.6.9-rc1-mm1] Prescott fix for perfctr Mikael Pettersson

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

all inboxes | Powered by JetHome®