perf, x86: P4 PMU -- capture extra nmi on overflow It was observed that in case of performance nmi an extra nmi may be issued, capture it otherwise 'unknown' nmi message will appear. Signed-off-by: Cyrill Gorcunov --- arch/x86/kernel/cpu/perf_event_p4.c | 9 +++++++++ 1 file changed, 9 insertions(+) Index: linux-2.6.tip/arch/x86/kernel/cpu/perf_event_p4.c =================================================================== --- linux-2.6.tip.orig/arch/x86/kernel/cpu/perf_event_p4.c +++ linux-2.6.tip/arch/x86/kernel/cpu/perf_event_p4.c @@ -950,6 +950,15 @@ static int p4_pmu_handle_irq(struct pt_r } if (handled) { + /* + * p4 quirk: extra NMI might happen so we + * add one more here, the back-to-back + * nmi logic will capture it; if more than + * one counter triggered an extra nmi will + * be captured anyway + */ + if (handled < 2) + handled++; /* p4 quirk: unmask it again */ apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); inc_irq_stat(apic_perf_irqs);