diff options
author | Janne Grunau <j@jannau.net> | 2023-02-14 11:38:02 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-03-27 16:15:14 +0200 |
commit | 7d0bfb7c997753ef88f4c3a29f3409c8cb052ab1 (patch) | |
tree | 6edeeb10cf60964e8a9c98eefbd27eac7d18a1f3 /drivers/perf | |
parent | dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores (diff) | |
download | linux-7d0bfb7c997753ef88f4c3a29f3409c8cb052ab1.tar.xz linux-7d0bfb7c997753ef88f4c3a29f3409c8cb052ab1.zip |
drivers/perf: apple_m1: Add Apple M2 support
The PMU itself is compatible with the one found on M1. We still know
next to nothing about the counters so keep using CPU uarch specific
compatibles/PMU names.
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Mark Rutland <mark.rutland@arm.com.
Reviewed-by: Hector Martin <marcan@marcan.st>
Link: https://lore.kernel.org/r/20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/apple_m1_cpu_pmu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c index 7123beeb992f..8574c6e58c83 100644 --- a/drivers/perf/apple_m1_cpu_pmu.c +++ b/drivers/perf/apple_m1_cpu_pmu.c @@ -559,7 +559,21 @@ static int m1_pmu_fire_init(struct arm_pmu *cpu_pmu) return m1_pmu_init(cpu_pmu); } +static int m2_pmu_avalanche_init(struct arm_pmu *cpu_pmu) +{ + cpu_pmu->name = "apple_avalanche_pmu"; + return m1_pmu_init(cpu_pmu); +} + +static int m2_pmu_blizzard_init(struct arm_pmu *cpu_pmu) +{ + cpu_pmu->name = "apple_blizzard_pmu"; + return m1_pmu_init(cpu_pmu); +} + static const struct of_device_id m1_pmu_of_device_ids[] = { + { .compatible = "apple,avalanche-pmu", .data = m2_pmu_avalanche_init, }, + { .compatible = "apple,blizzard-pmu", .data = m2_pmu_blizzard_init, }, { .compatible = "apple,icestorm-pmu", .data = m1_pmu_ice_init, }, { .compatible = "apple,firestorm-pmu", .data = m1_pmu_fire_init, }, { }, |