From: Keir Fraser Date: Mon, 22 Dec 2008 12:07:20 +0000 (+0000) Subject: Cleanup Intel CMCI support. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14026^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1b3c590b6c6dda2f24a50ff56ff35e1910dcb4f2;p=xen.git Cleanup Intel CMCI support. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c index 2331f5d670..ebc222dc49 100644 --- a/xen/arch/x86/cpu/mcheck/mce.c +++ b/xen/arch/x86/cpu/mcheck/mce.c @@ -116,16 +116,6 @@ int mce_available(struct cpuinfo_x86 *c) return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA); } -/*Make sure there are no machine check on offlined or suspended CPUs*/ -void mce_disable_cpu(void) -{ - if (!mce_available(¤t_cpu_data) || mce_disabled == 1) - return; - printk(KERN_DEBUG "MCE: disable mce on CPU%d\n", smp_processor_id()); - clear_in_cr4(X86_CR4_MCE); -} - - /* This has to be run for each processor */ void mcheck_init(struct cpuinfo_x86 *c) { diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index c053f6b0ee..b951fb9fbd 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -18,7 +18,7 @@ extern int firstbank; #ifdef CONFIG_X86_MCE_THERMAL static void unexpected_thermal_interrupt(struct cpu_user_regs *regs) -{ +{ printk(KERN_ERR "Thermal: CPU%d: Unexpected LVT TMR interrupt!\n", smp_processor_id()); add_taint(TAINT_MACHINE_CHECK); @@ -67,11 +67,11 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) /* Thermal monitoring */ if (!cpu_has(c, X86_FEATURE_ACPI)) - return; /* -ENODEV */ + return; /* -ENODEV */ /* Clock modulation */ if (!cpu_has(c, X86_FEATURE_ACC)) - return; /* -ENODEV */ + return; /* -ENODEV */ /* first check if its enabled already, in which case there might * be some SMM goo which handles it, so we can't even put a handler @@ -87,7 +87,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) if (cpu_has(c, X86_FEATURE_TM2) && (l & (1 << 13))) tm2 = 1; - /* check whether a vector already exists, temporarily masked? */ + /* check whether a vector already exists, temporarily masked? */ if (h & APIC_VECTOR_MASK) { printk(KERN_DEBUG "CPU%d: Thermal LVT vector (%#x) already installed\n", cpu, (h & APIC_VECTOR_MASK)); @@ -95,8 +95,8 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) } /* The temperature transition interrupt handler setup */ - h = THERMAL_APIC_VECTOR; /* our delivery vector */ - h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ + h = THERMAL_APIC_VECTOR; /* our delivery vector */ + h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ apic_write_around(APIC_LVTTHMR, h); rdmsr (MSR_IA32_THERM_INTERRUPT, l, h); @@ -121,7 +121,7 @@ static inline void intel_get_extended_msrs(struct mcinfo_extended *mc_ext) if (nr_intel_ext_msrs == 0) return; - /*this function will called when CAP(9).MCG_EXT_P = 1*/ + /*this function will called when CAP(9).MCG_EXT_P = 1*/ memset(mc_ext, 0, sizeof(struct mcinfo_extended)); mc_ext->common.type = MC_TYPE_EXTENDED; mc_ext->common.size = sizeof(mc_ext); @@ -198,7 +198,7 @@ static int machine_check_poll(struct mc_info *mi, int calltype) struct mcinfo_bank mcb; /*For CMCI, only owners checks the owned MSRs*/ if ( !test_bit(i, __get_cpu_var(mce_banks_owned)) && - (calltype & MC_FLAG_CMCI) ) + (calltype & MC_FLAG_CMCI) ) continue; rdmsrl(MSR_IA32_MC0_STATUS + 4 * i, status); @@ -277,38 +277,38 @@ static fastcall void intel_machine_check(struct cpu_user_regs * regs, long error u32 mcgstl, mcgsth; int i; - rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth); - if (mcgstl & (1<<0)) /* Recoverable ? */ - recover=0; + rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth); + if (mcgstl & (1<<0)) /* 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: %08x%08x\n", + smp_processor_id(), mcgsth, mcgstl); for (i=0; i