diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-07-31 19:51:22 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-08-16 15:09:12 +0300 |
commit | 126d7d7cce5e048fb82477a9842d088d10ff0df6 (patch) | |
tree | 2c6ce4ffdb4206581a523cb8b60b88bca179a7e6 /include | |
parent | f9b11aa00708d94a0cd78bfde34b68c0f95d8b50 (diff) | |
download | linux-126d7d7cce5e048fb82477a9842d088d10ff0df6.tar.xz |
arm64: perf/kvm: Use a common PMU cycle counter define
The PMUv3 and KVM code each have a define for the PMU cycle counter
index. Move KVM's define to a shared location and use it for PMUv3
driver.
Reviewed-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Tested-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20240731-arm-pmu-3-9-icntr-v3-5-280a8d7ff465@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/kvm/arm_pmu.h | 1 | ||||
-rw-r--r-- | include/linux/perf/arm_pmuv3.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index 334d7c5503cf..871067fb2616 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h @@ -10,7 +10,6 @@ #include <linux/perf_event.h> #include <linux/perf/arm_pmuv3.h> -#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1) #if IS_ENABLED(CONFIG_HW_PERF_EVENTS) && IS_ENABLED(CONFIG_KVM) struct kvm_pmc { diff --git a/include/linux/perf/arm_pmuv3.h b/include/linux/perf/arm_pmuv3.h index 792b8e10b72a..f4ec76f725a3 100644 --- a/include/linux/perf/arm_pmuv3.h +++ b/include/linux/perf/arm_pmuv3.h @@ -9,6 +9,9 @@ #define ARMV8_PMU_MAX_GENERAL_COUNTERS 31 #define ARMV8_PMU_MAX_COUNTERS 32 +#define ARMV8_PMU_CYCLE_IDX 31 + + /* * Common architectural and microarchitectural event numbers. */ |