From ed823e69967877614d071623e5d887cb7afa78bb Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 2 Apr 2012 20:19:17 +0200 Subject: [PATCH] --- yaml --- r: 304893 b: refs/heads/master c: fc5fb2b5e1874e5894e2ac503bfb744220db89a1 h: refs/heads/master i: 304891: 6fdcb26a89c847ce31c001015a447cec6c0d21bb v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/cpu/perf_event_amd_ibs.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index a83b27961563..8c7e7ba30073 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c9574fe0bdb9ac9a2698e02a712088ce8431e9f8 +refs/heads/master: fc5fb2b5e1874e5894e2ac503bfb744220db89a1 diff --git a/trunk/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/trunk/arch/x86/kernel/cpu/perf_event_amd_ibs.c index b14e71127c82..5a9f95b5cc26 100644 --- a/trunk/arch/x86/kernel/cpu/perf_event_amd_ibs.c +++ b/trunk/arch/x86/kernel/cpu/perf_event_amd_ibs.c @@ -473,11 +473,13 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs) u64 *buf, *config, period; if (!test_bit(IBS_STARTED, pcpu->state)) { - /* Catch spurious interrupts after stopping IBS: */ - if (!test_and_clear_bit(IBS_STOPPING, pcpu->state)) - return 0; - rdmsrl(perf_ibs->msr, *ibs_data.regs); - return (*ibs_data.regs & perf_ibs->valid_mask) ? 1 : 0; + /* + * Catch spurious interrupts after stopping IBS: After + * disabling IBS there could be still incomming NMIs + * with samples that even have the valid bit cleared. + * Mark all this NMIs as handled. + */ + return test_and_clear_bit(IBS_STOPPING, pcpu->state) ? 1 : 0; } msr = hwc->config_base;