Clear APIC TMICT when we mask APIC LVTT.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
maxlvt = get_maxlvt();
+ /* Work around AMD Erratum 411. This is a nice thing to do anyway. */
+ apic_write_around(APIC_TMICT, 0);
+
/*
* Masking an LVT entry on a P6 can trigger a local APIC error
* if the vector is zero. Mask LVTERR first to prevent this.
{
if (using_apic_timer) {
unsigned long v;
-
+
+ /* Work around AMD Erratum 411. This is a nice thing to do anyway. */
+ apic_write_around(APIC_TMICT, 0);
+
v = apic_read(APIC_LVTT);
apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED);
}
spin_unlock(&ch->lock);
}
- /* Cancel any outstanding LAPIC timer event and disable interrupts. */
- reprogram_timer(0);
+ /* Disable LAPIC timer interrupts. */
disable_APIC_timer();
spin_lock(&ch->lock);