arm64: perf: Clean up enable/disable calls
authorRobin Murphy <robin.murphy@arm.com>
Tue, 17 Mar 2020 18:22:54 +0000 (18:22 +0000)
committerWill Deacon <will@kernel.org>
Tue, 17 Mar 2020 22:45:59 +0000 (22:45 +0000)
commit29227d6ea1572b160e5bea45b3c93a0346444dfa
tree2811d2247673352152d46e73b36ed58e181036f8
parent06236821aeac480a0835dd8dd9fb20e3b5a5d80d
arm64: perf: Clean up enable/disable calls

Reading this code bordered on painful, what with all the repetition and
pointless return values. More fundamentally, dribbling the hardware
enables and disables in one bit at a time incurs needless system
register overhead for chained events and on reset. We already use
bitmask values for the KVM hooks, so consolidate all the register
accesses to match, and make a reasonable saving in both source and
object code.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/perf_event.c