Use an unsigned number to prevent sign extension in the calculation
to work out the difference between the previous and the current
count obtained from the perfomance instrumentation counters.
Orabug:
22607658
Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
(cherry picked from commit
b0fb8b78a2cc452512296ce5bec1fa927ebf867e)
(cherry picked from commit
da8cc212a978a1f54cadadeaabed46d9d5f839b3)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
struct hw_perf_event *hwc, int idx)
{
int shift = 64 - 32;
- u64 prev_raw_count, new_raw_count;
- s64 delta;
+ u64 prev_raw_count, new_raw_count, delta;
again:
prev_raw_count = local64_read(&hwc->prev_count);