Skip to content

Commit

Permalink
perf, x86: Handle in flight NMIs on P4 platform
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cyrillos authored and Ingo Molnar committed Sep 30, 2010
1 parent 98d943b commit 03e2219
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/x86/kernel/cpu/perf_event_p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03e2219

Please sign in to comment.