Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 8054/1: perf: add support for the Cortex-A17 PMU

The Cortex-A17 PMU is identical to that of the A12, so wire up a new
compatible string to the existing event structures.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Will Deacon and committed by
Russell King
03eff46c 0e0779da

+14
+1
Documentation/devicetree/bindings/arm/pmu.txt
··· 8 8 9 9 - compatible : should be one of 10 10 "arm,armv8-pmuv3" 11 + "arm,cortex-a17-pmu" 11 12 "arm,cortex-a15-pmu" 12 13 "arm,cortex-a12-pmu" 13 14 "arm,cortex-a9-pmu"
+1
arch/arm/kernel/perf_event_cpu.c
··· 221 221 * PMU platform driver and devicetree bindings. 222 222 */ 223 223 static struct of_device_id cpu_pmu_of_device_ids[] = { 224 + {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init}, 224 225 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 225 226 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init}, 226 227 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init},
+12
arch/arm/kernel/perf_event_v7.c
··· 1599 1599 return 0; 1600 1600 } 1601 1601 1602 + static int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu) 1603 + { 1604 + armv7_a12_pmu_init(cpu_pmu); 1605 + cpu_pmu->name = "ARMv7 Cortex-A17"; 1606 + return 0; 1607 + } 1608 + 1602 1609 /* 1603 1610 * Krait Performance Monitor Region Event Selection Register (PMRESRn) 1604 1611 * ··· 2024 2017 } 2025 2018 2026 2019 static inline int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu) 2020 + { 2021 + return -ENODEV; 2022 + } 2023 + 2024 + static inline int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu) 2027 2025 { 2028 2026 return -ENODEV; 2029 2027 }