Re: [PATCH v2 01/14] drivers/perf: apple_m1: Refactor event select/filter configuration
From: Marc Zyngier
Date: Wed Feb 19 2025 - 11:23:58 EST
On Mon, 03 Feb 2025 18:30:58 +0000,
Oliver Upton <oliver.upton@xxxxxxxxx> wrote:
>
> Supporting guest mode events will necessitate programming two event
> filters. Prepare by splitting up the programming of the event selector +
> event filter into separate headers.
s/headers/helpers/ ?
>
> Opportunistically replace RMW patterns with sysreg_clear_set_s().
>
> Tested-by: Janne Grunau <j@xxxxxxxxxx>
> Signed-off-by: Oliver Upton <oliver.upton@xxxxxxxxx>
> ---
> arch/arm64/include/asm/apple_m1_pmu.h | 1 +
> drivers/perf/apple_m1_cpu_pmu.c | 52 ++++++++++++++++-----------
> 2 files changed, 33 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm64/include/asm/apple_m1_pmu.h b/arch/arm64/include/asm/apple_m1_pmu.h
> index 99483b19b99f..02e05d05851f 100644
> --- a/arch/arm64/include/asm/apple_m1_pmu.h
> +++ b/arch/arm64/include/asm/apple_m1_pmu.h
> @@ -37,6 +37,7 @@
> #define PMCR0_PMI_ENABLE_8_9 GENMASK(45, 44)
>
> #define SYS_IMP_APL_PMCR1_EL1 sys_reg(3, 1, 15, 1, 0)
> +#define SYS_IMP_APL_PMCR1_EL12 sys_reg(3, 1, 15, 7, 2)
nit: this should be moved to the following patch.
Otherwise looks good to me.
M.
--
Without deviation from the norm, progress is not possible.