arm: pmu: Share user ABI format mechanism with SPE
authorJames Clark <james.clark@arm.com>
Mon, 11 Dec 2023 16:13:18 +0000 (16:13 +0000)
committerWill Deacon <will@kernel.org>
Tue, 12 Dec 2023 09:46:22 +0000 (09:46 +0000)
commitf6da86969a3c284466ab6080764b2ed91689f262
tree5b9b89287e3d9e7e6806d4260a0d60776fbbf4f5
parent3115ee021bfb04efde2e96507bfcc1330261a6a1
arm: pmu: Share user ABI format mechanism with SPE

This mechanism makes it much easier to define and read new attributes
so move it to the arm_pmu.h header so that it can be shared. At the same
time update the existing format attributes to use it.

GENMASK has to be changed to GENMASK_ULL because the config fields are
64 bits even on arm32 where this will also be used now.

Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20231211161331.1277825-7-james.clark@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_pmuv3.c
drivers/perf/arm_spe_pmu.c
include/linux/perf/arm_pmu.h