This adda nmi_watchdog=2 support to the Pentium M processor. The P-M is
a P6 chip, but it shares some chipset logic with the Pentium 4, so it
requires this workaround to function.
Without this patch, NMI gets stuck after 1 count. With it, the NMI
fires and breaks me out of UHCI-related hard lockups.
This patch is basically a modified version of the same patch for
oprofile. See the threaded discussion here:
http://lkml.org/lkml/2004/2/12/181
wrmsr(MSR_P4_IQ_CCCR0, P4_NMI_IQ_CCCR0, 0);
apic_write(APIC_LVTPC, APIC_DM_NMI);
}
+ else if (nmi_perfctr_msr == MSR_P6_PERFCTR0) {
+ /* Only P6 based Pentium M need to re-unmask
+ * the apic vector but it doesn't hurt
+ * other P6 variant */
+ apic_write(APIC_LVTPC,
+ apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED);
+ }
wrmsr(nmi_perfctr_msr, -(cpu_khz/nmi_hz*1000), -1);
}
}