public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aristeu Rozanski <arozansk@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, jvillalovos@redhat.com
Subject: [PATCH] perfctr: don't use CCCR_OVF_PMI1 on Pentium 4Ds
Date: Thu, 14 Aug 2008 16:32:15 -0400	[thread overview]
Message-ID: <20080814203133.GS7154@redhat.com> (raw)

Currently, setup_p4_watchdog() use CCCR_OVF_PMI1 to enable the counter
overflow interrupts to the second logical core. But this bit doesn't work
on Pentium 4 Ds (model 4, stepping 4) and this patch avoids its use on
these processors. Tested on 4 different machines that have this
specific model with success.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>

---
 arch/x86/kernel/cpu/perfctr-watchdog.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- linus-2.6.orig/arch/x86/kernel/cpu/perfctr-watchdog.c	2008-08-12 11:13:35.000000000 -0400
+++ linus-2.6/arch/x86/kernel/cpu/perfctr-watchdog.c	2008-08-12 11:21:09.000000000 -0400
@@ -478,7 +478,13 @@ static int setup_p4_watchdog(unsigned nm
 		perfctr_msr = MSR_P4_IQ_PERFCTR1;
 		evntsel_msr = MSR_P4_CRU_ESCR0;
 		cccr_msr = MSR_P4_IQ_CCCR1;
-		cccr_val = P4_CCCR_OVF_PMI1 | P4_CCCR_ESCR_SELECT(4);
+
+		/* Pentium 4 D processors don't support P4_CCCR_OVF_PMI1 */
+		if (boot_cpu_data.x86_model == 4 && boot_cpu_data.x86_mask == 4)
+			cccr_val = P4_CCCR_OVF_PMI0;
+		else
+			cccr_val = P4_CCCR_OVF_PMI1;
+		cccr_val |= P4_CCCR_ESCR_SELECT(4);
 	}
 
 	evntsel = P4_ESCR_EVENT_SELECT(0x3F)

             reply	other threads:[~2008-08-14 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 20:32 Aristeu Rozanski [this message]
2008-08-15 11:59 ` [PATCH] perfctr: don't use CCCR_OVF_PMI1 on Pentium 4Ds Ingo Molnar
2008-08-15 12:16   ` Aristeu Rozanski
2008-08-15 12:36     ` [PATCH] NMI: fix watchdog failure message Aristeu Rozanski
2008-08-15 13:36       ` Ingo Molnar
2008-08-15 14:02         ` Aristeu Rozanski

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=20080814203133.GS7154@redhat.com \
    --to=arozansk@redhat.com \
    --cc=jvillalovos@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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