Skip to content

Commit

Permalink
[PATCH] i386: check capability
Browse files Browse the repository at this point in the history
Currently the i386 architecture checks the family for mce capability and this
removes that and uses the CPUID information.  Tested on a K8 revE and a
family10h processor.

This eliminates checking of a set AMD procesor family if mce is
allowed and relies on the information being in CPUID.

Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Joachim Deguara authored and Andi Kleen committed May 2, 2007
1 parent 1bdae45 commit 2f3c30e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions arch/i386/kernel/cpu/mcheck/k7.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ void amd_mcheck_init(struct cpuinfo_x86 *c)
machine_check_vector = k7_machine_check;
wmb();

if (!cpu_has(c, X86_FEATURE_MCE))
return;

printk (KERN_INFO "Intel machine check architecture supported.\n");
rdmsr (MSR_IA32_MCG_CAP, l, h);
if (l & (1<<8)) /* Control register present ? */
Expand Down
3 changes: 1 addition & 2 deletions arch/i386/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ void mcheck_init(struct cpuinfo_x86 *c)

switch (c->x86_vendor) {
case X86_VENDOR_AMD:
if (c->x86==6 || c->x86==15)
amd_mcheck_init(c);
amd_mcheck_init(c);
break;

case X86_VENDOR_INTEL:
Expand Down

0 comments on commit 2f3c30e

Please sign in to comment.