public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: backport AMD K7 MCE changes.
Date: Fri, 3 Oct 2003 21:54:08 +0100	[thread overview]
Message-ID: <20031003205408.GA17829@redhat.com> (raw)

We're still accessing MCE bank 0 on Athlons in 2.4 when we shouldn't.
(We don't enable it, but we still check it in the exception handler)
This is fixed differently in 2.6, but is a minimal change
to reproduce the same effect.

		Dave

--- linux-2.4.22/arch/i386/kernel/bluesmoke.c~	2003-10-03 21:47:11.000000000 +0100
+++ linux-2.4.22/arch/i386/kernel/bluesmoke.c	2003-10-03 21:49:55.000000000 +0100
@@ -16,6 +16,7 @@
  */
 
 static int banks;
+static int startbank;
 
 static void intel_machine_check(struct pt_regs * regs, long error_code)
 {
@@ -30,7 +31,7 @@
 
 	printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", smp_processor_id(), mcgsth, mcgstl);
 	
-	for(i=0;i<banks;i++)
+	for(i=startbank;i<banks;i++)
 	{
 		rdmsr(MSR_IA32_MC0_STATUS+i*4,low, high);
 		if(high&(1<<31))
@@ -219,10 +220,13 @@
 	{
 		case X86_VENDOR_AMD:
 			/*
-			 *	AMD K7 machine check is Intel like
+			 *	AMD K7/K8 machine check is Intel like.
 			 */
-			if(c->x86 == 6 || c->x86 == 15)
+			
+			if(c->x86 == 6 || c->x86 == 15) {
+				startbank = 1;
 				intel_mcheck_init(c);
+			}
 			break;
 		case X86_VENDOR_INTEL:
 			intel_mcheck_init(c);

-- 
 Dave Jones     http://www.codemonkey.org.uk

             reply	other threads:[~2003-10-03 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 20:54 Dave Jones [this message]
     [not found] <20031003205408.GA17829@redhat.com.suse.lists.linux.kernel>
2003-10-03 21:08 ` backport AMD K7 MCE changes Andi Kleen

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=20031003205408.GA17829@redhat.com \
    --to=davej@redhat.com \
    --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