Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 89877e42827f16fa5f86b1df0c2860b1 > files > 2509

kernel-2.6.18-128.1.10.el5.src.rpm

From: Bhavana Nagendra <bnagendr@redhat.com>
Subject: [RHEL5.1 PATCH]  2/3 : Fix CPUID calls to support GH processors
Date: Fri, 20 Apr 2007 12:13:54 -0400
Bugzilla: 222123
Message-Id: <4628E6C2.9010806@redhat.com>
Changelog: [x86] Use CPUID calls to check for mce


BZ 222123

Currently the i386 architecture checks the family for mce capability and 
this removes that and uses
the CPUID information.  This patch is in the latest -mm patch : 
2.6.21-rc6-mm1.

Please ACK or comment.



--- linux-2.6.18.x86_64/arch/i386/kernel/cpu/mcheck/mce.c.mceorig	2007-04-13 16:25:18.000000000 -0400
+++ linux-2.6.18.x86_64/arch/i386/kernel/cpu/mcheck/mce.c	2007-04-13 16:32:17.000000000 -0400
@@ -37,8 +37,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:
--- linux-2.6.18.x86_64/arch/i386/kernel/cpu/mcheck/k7.c.mceorig	2007-04-13 16:25:47.000000000 -0400
+++ linux-2.6.18.x86_64/arch/i386/kernel/cpu/mcheck/k7.c	2007-04-13 16:31:21.000000000 -0400
@@ -75,6 +75,9 @@ void amd_mcheck_init(struct cpuinfo_x86 
 	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 ? */