Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209270
b: refs/heads/master
c: b3e84ff
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Aug 11, 2010
1 parent 48e555e commit 16865b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4694153c252a6ae19704b5bb66466050256395a4
refs/heads/master: b3e84ffa21f916e3354a12a7f19169c9febe96d0
9 changes: 6 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_event_p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
cpuc = &__get_cpu_var(cpu_hw_events);

for (idx = 0; idx < x86_pmu.num_counters; idx++) {
int overflow;

if (!test_bit(idx, cpuc->active_mask))
continue;
Expand All @@ -666,12 +667,14 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
WARN_ON_ONCE(hwc->idx != idx);

/* it might be unflagged overflow */
handled = p4_pmu_clear_cccr_ovf(hwc);
overflow = p4_pmu_clear_cccr_ovf(hwc);

val = x86_perf_event_update(event);
if (!handled && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
if (!overflow && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
continue;

handled += overflow;

/* event overflow for sure */
data.period = event->hw.last_period;

Expand All @@ -687,7 +690,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
inc_irq_stat(apic_perf_irqs);
}

return handled;
return handled > 0;
}

/*
Expand Down

0 comments on commit 16865b6

Please sign in to comment.