mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@user.it.uu.se>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.6.9-rc1-mm1] Prescott fix for perfctr
Date: Thu, 26 Aug 2004 16:16:03 +0200	[thread overview]
Message-ID: <16685.61603.854888.723403@alkaid.it.uu.se> (raw)

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);

                 reply	other threads:[~2004-08-26 14:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16685.61603.854888.723403@alkaid.it.uu.se \
    --to=mikpe@user.it.uu.se \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®