public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@suse.de>
To: Jon Hourd <jonhourd@telus.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.4.18 - 2.5.7  bluesmoke.c corrected MCA setup for different Pentium cores.
Date: Fri, 22 Mar 2002 19:14:54 +0100	[thread overview]
Message-ID: <20020322191454.O22861@suse.de> (raw)
In-Reply-To: <5.1.0.14.0.20020322094928.009e6ec0@pop.telus.net>

On Fri, Mar 22, 2002 at 10:05:16AM -0800, Jon Hourd wrote:
 > Hello,
 > 	Here are some patches to correct the MCA setup for different Pentium cores 
 > in bluesmoke.c.  The P6 family must not initialize MSR_IA32_MC0_CTL in 
 > software, it must be done by the bios.  The P4/Xeon cores must have this 
 > bank initialized in software.  Added check for processor type and 
 > associated init loops.  Included patches against 2.5.7 and 2.4.18.

Just a tiny nit to pick...

@@ -167,9 +169,25 @@
 	if(l&(1<<8))
 		wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
 	banks = l&0xff;
-	for(i=1;i<banks;i++)
-	{
-		wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
+
+	/* Check Core version for P6 or P4/Xeon */
+
+	if(c->x86 == 6)	{
+		printk(KERN_INFO "Detected P6 Core.\n");
+		for(i=1;i<banks;i++)			/* Must start with bank 1 for P6 Cores */
+		{
+			wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
+		}
+	} else if(c->x86 == 15) {
+		printk(KERN_INFO "Detected P4/Xeon Core.\n");
+		for(i=0;i<banks;i++)			/* Must start with bank 0 for Pentium 4 and Xeon Processors */

This function can be called by non-Intel hardware. No other vendor has
a family 15 CPU, but it's one less surprise if ever someone does make
one.

Also, take a look at bluesmoke.c in 2.5.7-dj1, it's quite a bit
different from mainline (in particular the timer foo), and also
incorporates some of the bits from your patch already.

Other than that, looks fine to me.

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

      reply	other threads:[~2002-03-22 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-22 18:05 [PATCH] 2.4.18 - 2.5.7 bluesmoke.c corrected MCA setup for different Pentium cores Jon Hourd
2002-03-22 18:14 ` Dave Jones [this message]

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=20020322191454.O22861@suse.de \
    --to=davej@suse.de \
    --cc=jonhourd@telus.net \
    --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