perf/arm_cspmu: Simplify initialisation
authorRobin Murphy <robin.murphy@arm.com>
Tue, 6 Feb 2024 10:27:54 +0000 (10:27 +0000)
committerWill Deacon <will@kernel.org>
Fri, 9 Feb 2024 17:34:34 +0000 (17:34 +0000)
commitdf2675ad7748ea1a4bdb47f9835a30f50d4dc5ea
tree7c5fdd30fcd69276b3c8775d917a44d9d78dc6de
parenta1083ee717e9bde012268782e084d343314490a4
perf/arm_cspmu: Simplify initialisation

It's far simpler for implementations to literally override whichever
default ops they want to, by initialising to the default ops first. This
saves all the bother of checking what the impl_init_ops call has or
hasn't touched. Make the same clear distinction for the PMIIDR override
as well, in case we gain more sources for overriding that in future.

Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/dd39718ee4890fd46a8e443c25303e87ae23f422.1706718007.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_cspmu/arm_cspmu.c
drivers/perf/arm_cspmu/nvidia_cspmu.c