]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64: Fix perf performance counter overflow calculation
authorDave Aldridge <david.j.aldridge@oracle.com>
Fri, 29 Jan 2016 11:03:10 +0000 (03:03 -0800)
committerAllen Pais <allen.pais@oracle.com>
Thu, 4 Feb 2016 13:11:10 +0000 (18:41 +0530)
commit165050c19535518a2f70856da2fc405b8a73ce7d
tree898780c768b4606517fb81e24b191dc0b92da3a4
parent83b6f6d8dade657b63e035b7ed471cfa6928b2d4
sparc64: Fix perf performance counter overflow calculation

If sparc_perf_event_update() is called between performcnce counter
overflow interrupts then everything is fine and the total event
count calculation is correct. If however, the
sparc_perf_event_update() is only called when the performance counter
overflows, we do not take the counter wrap into consideration.
This leaves us with an incorrect value for the total event count.

This patch fixes this issue by taking the counter overflow situation
into consideration.

Orabug: 22607658

Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
(cherry picked from commit 6c89361408f964ad2c2c29200987aece3a7c222d)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/perf_event.c