Skip to content

Commit cc91b94

Browse files
Anshuman Khandualwilldeacon
authored andcommitted
arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI
__armv8pmu_probe_pmu() returns if detected PMU is either not implemented or implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI defined as '0b0000'. Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Will Deacon <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Anshuman Khandual <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent ce00d12 commit cc91b94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm64/kernel/perf_event.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,8 @@ static void __armv8pmu_probe_pmu(void *info)
11461146
dfr0 = read_sysreg(id_aa64dfr0_el1);
11471147
pmuver = cpuid_feature_extract_unsigned_field(dfr0,
11481148
ID_AA64DFR0_EL1_PMUVer_SHIFT);
1149-
if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || pmuver == 0)
1149+
if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF ||
1150+
pmuver == ID_AA64DFR0_EL1_PMUVer_NI)
11501151
return;
11511152

11521153
cpu_pmu->pmuver = pmuver;

0 commit comments

Comments
 (0)