aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <[email protected]>2010-09-29 23:01:38 -0400
committerIngo Molnar <[email protected]>2010-09-30 09:17:59 +0200
commit03e22198d2379ffa746c9ea332fbb1f094f9423b (patch)
tree51ab8e4665943d9a703c110fba68a90d4410eb43
parent98d943b02f6f1b57787ff1aa6f34d019a407e3ee (diff)
perf, x86: Handle in flight NMIs on P4 platform
Stephane reported we've forgot to guard the P4 platform against spurious in-flight performance IRQs. Fix it. This fixes potential spurious 'dazed and confused' NMI messages. Reported-by: Stephane Eranian <[email protected]> Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: Don Zickus <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Robert Richter <[email protected]> Cc: Lin Ming <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/kernel/cpu/perf_event_p4.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index b560db3305be..249015173992 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
int overflow;
- if (!test_bit(idx, cpuc->active_mask))
+ if (!test_bit(idx, cpuc->active_mask)) {
+ /* catch in-flight IRQs */
+ if (__test_and_clear_bit(idx, cpuc->running))
+ handled++;
continue;
+ }
event = cpuc->events[idx];
hwc = &event->hw;