} else {
mctelem_dismiss(mctc);
}
-
+
} else if (mctc != NULL) {
mctelem_dismiss(mctc);
}
/* HW does not count *all* kinds of correctable errors.
* Thus it is possible, that the polling routine finds an
- * correctable error even if the HW reports nothing. */
+ * correctable error even if the HW reports nothing. */
if (counter > 0) {
/* HW reported correctable errors,
* the polling routine did not find...
(counter == 1 ? "" : "s"),
(counter == 1 ? "was" : "were"));
}
- /* subtract 1 to not double count the error
- * from the polling service routine */
+ /* subtract 1 to not double count the error
+ * from the polling service routine */
adjust += (counter - 1);
/* Restart counter */
/* Counter enable */
value |= (1ULL << 51);
mca_wrmsr(MSR_IA32_MCx_MISC(4), value);
- wmb();
}
}
adjust = 0;
}
-void amd_nonfatal_mcheck_init(struct cpuinfo_x86 *c)
+void __init amd_nonfatal_mcheck_init(struct cpuinfo_x86 *c)
{
if (c->x86_vendor != X86_VENDOR_AMD)
return;
/* Counter enable */
value |= (1ULL << 51);
wrmsrl(MSR_IA32_MCx_MISC(4), value);
- /* serialize */
- wmb();
printk(XENLOG_INFO "MCA: Use hw thresholding to adjust polling frequency\n");
}
}
init_timer(&mce_timer, mce_amd_work_fn, NULL, 0);
set_timer(&mce_timer, NOW() + period);
-
- return;
}