diff options
| author | James Clark <james.clark@linaro.org> | 2026-03-05 16:28:19 +0000 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-03-24 12:33:49 +0000 |
| commit | 15ed3fa23cbcb9b9db842947698c3b4b2aeb706c (patch) | |
| tree | c8562f8d7aedf62eb9c3be842c1cf749f64f376e /arch/arm/include | |
| parent | d1dcc20bcc40efe1f1c71639376c91dafa489222 (diff) | |
| download | lwn-15ed3fa23cbcb9b9db842947698c3b4b2aeb706c.tar.gz lwn-15ed3fa23cbcb9b9db842947698c3b4b2aeb706c.zip | |
arm64: cpufeature: Use pmuv3_implemented() function
Other places that are doing this version comparison are already using
pmuv3_implemented(), so might as well use it here too for consistency.
Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm/include')
| -rw-r--r-- | arch/arm/include/asm/arm_pmuv3.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arm_pmuv3.h b/arch/arm/include/asm/arm_pmuv3.h index 2ec0e5e83fc9..ecfede0c0348 100644 --- a/arch/arm/include/asm/arm_pmuv3.h +++ b/arch/arm/include/asm/arm_pmuv3.h @@ -238,6 +238,13 @@ static inline void kvm_vcpu_pmu_resync_el0(void) {} static inline bool pmuv3_implemented(int pmuver) { + /* + * PMUVer follows the standard ID scheme for an unsigned field with the + * exception of 0xF (IMP_DEF) which is treated specially and implies + * FEAT_PMUv3 is not implemented. + * + * See DDI0487L.a D24.1.3.2 for more details. + */ return !(pmuver == ARMV8_PMU_DFR_VER_IMP_DEF || pmuver == ARMV8_PMU_DFR_VER_NI); } |
