Can you quote chapter and verse on that last statement?
(Preferably from IA32 Vol3.) Writes to APIC registers obviously
_do_ cause side-effects in some cases...
Pentium erratum 3AP can be ignored, since the whole purpose of the
two ESR accesses is to clear ESR. Unfortunately, Pentium erratum 11AP
does apply, since there are back-to-back APIC writes (first to LVTERR,
then to ESR).
The patch below fixes the 11AP and 82489DX issues. It has the usual test
before the write to ESR, which avoids both erratum 11AP (should the code
be moved around) and 3AP (redundantly, to avoid confusion).
(Linus, please apply.)
/Mikael
--- linux-2.5.2-pre6/arch/i386/kernel/apic.c.~1~ Thu Jan 3 19:08:00 2002
+++ linux-2.5.2-pre6/arch/i386/kernel/apic.c Thu Jan 3 19:58:26 2002
@@ -88,8 +88,12 @@
apic_write_around(APIC_LVTERR, APIC_LVT_MASKED);
if (maxlvt >= 4)
apic_write_around(APIC_LVTPC, APIC_LVT_MASKED);
- apic_write(APIC_ESR, 0);
- v = apic_read(APIC_ESR);
+ v = GET_APIC_VERSION(apic_read(APIC_LVR));
+ if (APIC_INTEGRATED(v)) { /* !82489DX */
+ if (maxlvt > 3) /* Due to Pentium errata 3AP and 11AP. */
+ apic_write(APIC_ESR, 0);
+ apic_read(APIC_ESR);
+ }
}
void __init connect_bsp_APIC(void)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/