|
@@ -630,6 +630,13 @@ void clear_local_APIC(void)
|
|
|
apic_write(APIC_LVTPC, v | APIC_LVT_MASKED);
|
|
|
}
|
|
|
|
|
|
+ /* lets not touch this if we didn't frob it */
|
|
|
+#if defined(CONFIG_X86_MCE_P4THERMAL) || defined(X86_MCE_INTEL)
|
|
|
+ if (maxlvt >= 5) {
|
|
|
+ v = apic_read(APIC_LVTTHMR);
|
|
|
+ apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED);
|
|
|
+ }
|
|
|
+#endif
|
|
|
/*
|
|
|
* Clean APIC state for other OSs:
|
|
|
*/
|
|
@@ -640,8 +647,14 @@ void clear_local_APIC(void)
|
|
|
apic_write(APIC_LVTERR, APIC_LVT_MASKED);
|
|
|
if (maxlvt >= 4)
|
|
|
apic_write(APIC_LVTPC, APIC_LVT_MASKED);
|
|
|
- apic_write(APIC_ESR, 0);
|
|
|
- apic_read(APIC_ESR);
|
|
|
+
|
|
|
+ /* Integrated APIC (!82489DX) ? */
|
|
|
+ if (lapic_is_integrated()) {
|
|
|
+ if (maxlvt > 3)
|
|
|
+ /* Clear ESR due to Pentium errata 3AP and 11AP */
|
|
|
+ apic_write(APIC_ESR, 0);
|
|
|
+ apic_read(APIC_ESR);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|