]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf/arm-cmn: Refactor DTC PMU register access
authorRobin Murphy <robin.murphy@arm.com>
Mon, 2 Sep 2024 17:52:02 +0000 (18:52 +0100)
committerWill Deacon <will@kernel.org>
Wed, 4 Sep 2024 15:04:08 +0000 (16:04 +0100)
commit67acca3504eade75e03ea3ae87a329df6b10ae02
tree5ef1b608988a5aa5ed6c597fc75118e361cc7bd2
parentc5b15ddf11a8a82f5e9ccd9b44f7b765c59bffdd
perf/arm-cmn: Refactor DTC PMU register access

Annoyingly, we're soon going to have to cope with PMU registers moving
about. This will mostly be straightforward, except for the hard-coding
of CMN_PMU_OFFSET for the DTC PMU registers. As a first step, refactor
those accessors to allow for encapsulating a variable offset without
making a big mess all over. As a bonus, we can repack the arm_cmn_dtc
structure to accommodate the new pointer without growing any larger,
since irq_friend only encodes a range of +/-3.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/fc677576fae7b5b55780e5b245a4ef6ea1b30daf.1725296395.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c