Commit
165050c1 introduced a change to the way we deal with
performance counter overflow interrupts. This change had the
side effect that when a performance counter overflow was
detected it assumed all performance counters in use
had overflowed. Thus, when using multiple performance
counters the event counting was incorrect.
This commit fixes this incorrect counting behaviour.
Orabug:
23106709
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
(cherry picked from commit
ef4dab8459ac6dd32538dc9448caf55ab68c2231)
(cherry picked from commit
741d96c0e37d7a73e17433355bb5bf513f2053af)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
int idx = cpuc->current_idx[i];
struct hw_perf_event *hwc;
u64 val;
+ u64 pcr = pcr_ops->read_pcr(idx);
+
+ /* If this 'event' didn't cause the interrupt just continue */
+ if ((pcr & (sparc_pmu->irq_bit | PCR_N4_OV)) !=
+ (sparc_pmu->irq_bit | PCR_N4_OV))
+ continue;
if (sparc_pmu->irq_bit &&
sparc_pmu->num_pcrs > 1)