[PATCH RESEND v7 02/21] drivers/perf: apple_m1: Only init PMUv3 remap when EL2 is available

Will Deacon will at kernel.org
Thu Jul 17 08:16:32 PDT 2025


On Mon, Jul 14, 2025 at 11:37:46PM +0800, Nick Chan wrote:
> 
> Will Deacon 於 2025/7/14 夜晚11:11 寫道:
> > On Mon, Jun 16, 2025 at 09:31:51AM +0800, Nick Chan wrote:
> >> Skip initialization of PMUv3 remap when EL2 is not available.
> >> Initialization is harmless in EL1 but it is still a weird thing to do.
> > Why is that weird?
> 
> Maybe I could use better wording but if the check is not here, then for Apple A7 which has very
> different event mappings, it either has to use the mappings for M1 which is wrong on the hardware,
> or declare an a7_pmu_pmceid_map, which would just be dead code since A7's CPU does not
> support EL2. Not initializing the mapping in EL1 avoid these problems.

That's definitely more motivating than what you have :)

Will



More information about the linux-arm-kernel mailing list