diff options
author | Marc Zyngier <maz@kernel.org> | 2021-04-14 14:44:05 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-04-22 13:32:39 +0100 |
commit | 5421db1be3b11c5e469cce3760d5c8a013a90f2c (patch) | |
tree | b0fcead0cc12ca98d98c54c129560622448e9074 /arch/arm64/kvm/perf.c | |
parent | 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff) |
KVM: arm64: Divorce the perf code from oprofile helpers
KVM/arm64 is the sole user of perf_num_counters(), and really
could do without it. Stop using the obsolete API by relying on
the existing probing code.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210414134409.1266357-2-maz@kernel.org
Diffstat (limited to 'arch/arm64/kvm/perf.c')
-rw-r--r-- | arch/arm64/kvm/perf.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm64/kvm/perf.c b/arch/arm64/kvm/perf.c index 739164324afe..b8b398670ef2 100644 --- a/arch/arm64/kvm/perf.c +++ b/arch/arm64/kvm/perf.c @@ -50,12 +50,7 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = { int kvm_perf_init(void) { - /* - * Check if HW_PERF_EVENTS are supported by checking the number of - * hardware performance counters. This could ensure the presence of - * a physical PMU and CONFIG_PERF_EVENT is selected. - */ - if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0) + if (kvm_pmu_probe_pmuver() != 0xf) static_branch_enable(&kvm_arm_pmu_available); return perf_register_guest_info_callbacks(&kvm_guest_cbs); |