Re: [PATCH 6/8] perf/arm-cmn: Refactor DTC PMU register access

From: Mark Rutland
Date: Fri Aug 16 2024 - 06:29:22 EST


On Fri, Aug 09, 2024 at 08:15:45PM +0100, Robin Murphy wrote:
> 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.
>
> Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx>
> ---
> drivers/perf/arm-cmn.c | 64 ++++++++++++++++++++++++------------------
> 1 file changed, 36 insertions(+), 28 deletions(-)

Aside from a minoe comment below this looks fine to me.

> struct arm_cmn_dtc {
> void __iomem *base;
> + void __iomem *pmu_base;
> int irq;
> - int irq_friend;
> + s8 irq_friend;

Unrelated change?

AFAICT there's no reason for 'irq_friend' to change from 'int' to 's8',
and nothing in the commit message explains it.

Otherwise this all looks fine to me.

Mark.