arm64: perf: Refactor PMU init callbacks
authorRobin Murphy <robin.murphy@arm.com>
Fri, 21 Feb 2020 19:35:31 +0000 (19:35 +0000)
committerWill Deacon <will@kernel.org>
Mon, 2 Mar 2020 11:54:06 +0000 (11:54 +0000)
commite424b17985262359181cce1553a1ea2cdf263941
tree0f99b332fd427ab8f8a84cace0289414476a814b
parentaaa19727159ef5616219a4b9dad7a84e693aebf5
arm64: perf: Refactor PMU init callbacks

The PMU init callbacks are already drowning in boilerplate, so before
doubling the number of supported PMU models, give it a sensible refactor
to significantly reduce the bloat, both in source and object code.
Although nobody uses non-default sysfs attributes today, there's minimal
impact to preserving the notion that maybe, some day, somebody might, so
we may as well keep up appearances.

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