[PATCH] arm64: guard AMU register access with ARM64_HAS_AMU_EXTN

Marek Vasut marek.vasut at mailbox.org
Thu Oct 23 06:16:28 PDT 2025


On 10/23/25 2:01 PM, Yicong Yang wrote:

Hello Yicong,

>> This patch is mainly meant to prevent a surprise in case someone does set ARM64_HAS_AMU_EXTN=n , and the system still faults on AMU register access.
>>
> 
> then I think it's more proper to guard it with CONFIG_ARM64_AMU_EXTN (I think you mean this above?)
> rathter than the cpu cap. then with the patch kernel won't touch the AMU registers here if the kconfig is
> disabled on you AMU supported hardware and AMU unsupported firmware.
> 
> move the guard into reset_amuserenr_el0 macro will be neater here (personally I think).

I can update the patch this way, sure.

If this is also OK with ARM people, I can send a V2 like that ?

-- 
Best regards,
Marek Vasut



More information about the linux-arm-kernel mailing list