public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Chuck Ebbert <cebbert@redhat.com>
Cc: Bob Tracy <rct@gherkin.frus.com>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	linux-kernel@vger.kernel.org,
	Joachim Deguara <joachim.deguara@amd.com>
Subject: Re: [BUG] (regression) AMD k6-III/450 won't boot w/2.6.22-rc1
Date: Thu, 17 May 2007 14:35:30 +0200	[thread overview]
Message-ID: <200705171435.31010.ak@suse.de> (raw)
In-Reply-To: <464B28F2.9050400@redhat.com>

On Wednesday 16 May 2007 17:53, Chuck Ebbert wrote:
> Bob Tracy wrote:
> > Jan Engelhardt wrote:
> >>> On Tue, 15 May 2007 22:13:14 -0500 (CDT) Bob Tracy wrote:
> >>>> The 2.6.22-rc1 boot panics early in amd_mcheck_init() with my
> >>>> k6-III/450.
> >
> > Intel machine check architecture supported.
> > general protection fault: 0000 [#1]
> > PREEMPT
> > Modules linked in:
> > CPU:   0
> > EIP: 0060:[<c01079f4>]  Not tainted VLI
> > EFLAGS: 00010286   (2.6.22-rc1 #1)
> > EIP is at amd_mcheck_init+0x2b/0xc3
>
> rdmsr with ecx == 0x179 (Machine Check Global Capabilities Register)
>
> Probably K6 doesn't have that.

Hmpf.

We cold either use rdmsr_safe or add a family check again or clear it 
in k6 setup.  I think clearing it in setup is cleanest.

Does this patch work?

-Andi

Clear MCE flag on AMD K6

It reports machine check capability in CPUID, but doesn't actually
implement all the necessary MSRs of the standard Intel machine
check architecture.

This fixes a boot failure recently introduced.

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/arch/i386/kernel/cpu/amd.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/amd.c
+++ linux/arch/i386/kernel/cpu/amd.c
@@ -280,6 +280,10 @@ static void __cpuinit init_amd(struct cp
 
 	if (c->x86 == 0x10 && !force_mwait)
 		clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
+
+	/* K6s reports MCEs but don't actually have all the MSRs */
+	if (c->x86 < 6) 
+		clear_bit(X86_FEATURE_MCE, c->x86_capability);
 }
 
 static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned 
int size)
Index: linux/arch/i386/kernel/cpu/mcheck/k7.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/mcheck/k7.c
+++ linux/arch/i386/kernel/cpu/mcheck/k7.c
@@ -72,12 +72,12 @@ void amd_mcheck_init(struct cpuinfo_x86 
 	u32 l, h;
 	int i;
 
-	machine_check_vector = k7_machine_check;
-	wmb();
-
 	if (!cpu_has(c, X86_FEATURE_MCE))
 		return;
 
+	machine_check_vector = k7_machine_check;
+	wmb();
+
 	printk (KERN_INFO "Intel machine check architecture supported.\n");
 	rdmsr (MSR_IA32_MCG_CAP, l, h);
 	if (l & (1<<8))	/* Control register present ? */

  parent reply	other threads:[~2007-05-17 12:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  3:13 [BUG] (regression) AMD k6-III/450 won't boot w/2.6.22-rc1 Bob Tracy
2007-05-16  4:27 ` Randy Dunlap
2007-05-16  7:03   ` Jan Engelhardt
2007-05-16 13:15     ` Bob Tracy
2007-05-16 15:53       ` Chuck Ebbert
2007-05-16 16:30         ` Dave Jones
2007-05-16 19:11           ` Bob Tracy
2007-05-16 19:22             ` Dave Jones
2007-05-16 21:07               ` Dave Jones
2007-05-17  4:36                 ` Bob Tracy
2007-05-17  6:08                   ` Dave Jones
2007-05-17 12:34                     ` Bob Tracy
2007-05-17 12:35         ` Andi Kleen [this message]
2007-05-17 12:54           ` Bob Tracy
2007-05-17 23:38           ` Bob Tracy
2007-05-18 14:38             ` Joachim Deguara

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=200705171435.31010.ak@suse.de \
    --to=ak@suse.de \
    --cc=cebbert@redhat.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=joachim.deguara@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=rct@gherkin.frus.com \
    /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