From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] mce: k7 cleanup Date: Wed, 23 Jun 2010 13:14:27 +0200 Message-ID: <201006231314.27927.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_TyeIMH31SV0/7kW" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_TyeIMH31SV0/7kW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch cleans up AMD k7 mce code. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_TyeIMH31SV0/7kW Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_k7.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_k7.diff" diff -r e2f5e4f3481c xen/arch/x86/cpu/mcheck/k7.c --- a/xen/arch/x86/cpu/mcheck/k7.c Tue Jun 22 16:22:30 2010 +0100 +++ b/xen/arch/x86/cpu/mcheck/k7.c Wed Jun 23 13:11:59 2010 +0200 @@ -19,51 +19,53 @@ /* Machine Check Handler For AMD Athlon/Duron */ static fastcall void k7_machine_check(struct cpu_user_regs * regs, long error_code) { - int recover=1; - u32 alow, ahigh, high, low; - u32 mcgstl, mcgsth; + int recover = 1; + uint64_t msr_content, mcgst; int i; - rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth); - if (mcgstl & (1<<0)) /* Recoverable ? */ - recover=0; + rdmsrl(MSR_IA32_MCG_STATUS, mcgst); + if (mcgst & MCG_STATUS_RIPV) /* Recoverable ? */ + recover = 0; - printk (KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", - smp_processor_id(), mcgsth, mcgstl); + printk(KERN_EMERG "CPU %d: Machine Check Exception: 0x%016"PRIx64"\n", + smp_processor_id(), mcgst); - for (i=1; i