diff options
-rw-r--r-- | arch/arm64/kernel/perf_event.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 98c749394c4b..5f64d19a3411 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c @@ -966,13 +966,14 @@ static void __armv8pmu_probe_pmu(void *info) { struct armv8pmu_probe_info *probe = info; struct arm_pmu *cpu_pmu = probe->pmu; - u64 dfr0, pmuver; + u64 dfr0; u32 pmceid[2]; + int pmuver; dfr0 = read_sysreg(id_aa64dfr0_el1); - pmuver = cpuid_feature_extract_unsigned_field(dfr0, + pmuver = cpuid_feature_extract_signed_field(dfr0, ID_AA64DFR0_PMUVER_SHIFT); - if (pmuver != 1) + if (pmuver < 1) return; probe->present = true; |