static int mce_dont_init;
/* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic,
static int mce_dont_init;
/* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic,
- return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
+ return test_bit(X86_FEATURE_MCE, &c->x86_capability) &&
+ test_bit(X86_FEATURE_MCA, &c->x86_capability);
if (regs)
notify_die(DIE_NMI, "machine check", regs, error_code, 18, SIGKILL);
if (!banks)
if (regs)
notify_die(DIE_NMI, "machine check", regs, error_code, 18, SIGKILL);
if (!banks)
memset(&m, 0, sizeof(struct mce));
m.cpu = safe_smp_processor_id();
memset(&m, 0, sizeof(struct mce));
m.cpu = safe_smp_processor_id();
out:
/* Last thing done in the machine check exception to clear state. */
wrmsrl(MSR_IA32_MCG_STATUS, 0);
out:
/* Last thing done in the machine check exception to clear state. */
wrmsrl(MSR_IA32_MCG_STATUS, 0);
get_option(&str, &tolerant);
else
printk("mce= argument %s ignored. Please use /sys", str);
get_option(&str, &tolerant);
else
printk("mce= argument %s ignored. Please use /sys", str);
/* Why are there no generic functions for this? */
#define ACCESSOR(name, var, start) \
/* Why are there no generic functions for this? */
#define ACCESSOR(name, var, start) \
sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
sysdev_unregister(&per_cpu(device_mce,cpu));
}
sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
sysdev_unregister(&per_cpu(device_mce,cpu));
}
mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
static struct notifier_block mce_cpu_notifier = {
.notifier_call = mce_cpu_callback,
};
static struct notifier_block mce_cpu_notifier = {
.notifier_call = mce_cpu_callback,
};