]> git.baikalelectronics.ru Git - kernel.git/commit
bus: arm-ccn: make event groups reliable
authorMark Rutland <mark.rutland@arm.com>
Thu, 11 Aug 2016 09:50:43 +0000 (10:50 +0100)
committerPawel Moll <pawel.moll@arm.com>
Fri, 26 Aug 2016 08:16:18 +0000 (09:16 +0100)
commite030254c76ca90ad6e7eaf264c5d1c228d4dc4d7
tree6d156228a6d37b892cc2c401752666dd435f162b
parent65b5b9dc3d62fd0040065ccf1aa55b319847f581
bus: arm-ccn: make event groups reliable

The CCN PMU driver leaves the counting logic always enabled, and thus
events are enabled while groups are manipulated. As each event is
stopped and read individually, this leads to arbitrary skew across event
groups, which can be seen if counting several identical events.

To avoid this, implement pmu_{enable,disable} callbacks to stop and
start all counters atomically around event manipulation. As the counters
are now stopped, we cannot poll the cycle counter to wait for events to
drain from the bus. However, as the counters are stopped and the events
will not be read regardless, we can simply allow the bus to drain
naturally.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
drivers/bus/arm-ccn.c