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

arm64: perf: add support for Cortex-A35

The Cortex-A35 uses some implementation defined perf events.

The Cortex-A35 derives from the Cortex-A53 core, using the same event mapings
based on Cortex-A35 TRM r0p2, section C2.3 - Performance monitoring events
(pages C2-562 to C2-565).

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by

Julien Thierry and committed by
Will Deacon
e884f80c 5561b6c5

+18
+1
Documentation/devicetree/bindings/arm/pmu.txt
··· 13 13 "arm,cortex-a72-pmu" 14 14 "arm,cortex-a57-pmu" 15 15 "arm,cortex-a53-pmu" 16 + "arm,cortex-a35-pmu" 16 17 "arm,cortex-a17-pmu" 17 18 "arm,cortex-a15-pmu" 18 19 "arm,cortex-a12-pmu"
+17
arch/arm64/kernel/perf_event.c
··· 990 990 return 0; 991 991 } 992 992 993 + static int armv8_a35_pmu_init(struct arm_pmu *cpu_pmu) 994 + { 995 + int ret = armv8_pmu_init(cpu_pmu); 996 + if (ret) 997 + return ret; 998 + 999 + cpu_pmu->name = "armv8_cortex_a35"; 1000 + cpu_pmu->map_event = armv8_a53_map_event; 1001 + cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_EVENTS] = 1002 + &armv8_pmuv3_events_attr_group; 1003 + cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_FORMATS] = 1004 + &armv8_pmuv3_format_attr_group; 1005 + 1006 + return 0; 1007 + } 1008 + 993 1009 static int armv8_a53_pmu_init(struct arm_pmu *cpu_pmu) 994 1010 { 995 1011 int ret = armv8_pmu_init(cpu_pmu); ··· 1104 1088 1105 1089 static const struct of_device_id armv8_pmu_of_device_ids[] = { 1106 1090 {.compatible = "arm,armv8-pmuv3", .data = armv8_pmuv3_init}, 1091 + {.compatible = "arm,cortex-a35-pmu", .data = armv8_a35_pmu_init}, 1107 1092 {.compatible = "arm,cortex-a53-pmu", .data = armv8_a53_pmu_init}, 1108 1093 {.compatible = "arm,cortex-a57-pmu", .data = armv8_a57_pmu_init}, 1109 1094 {.compatible = "arm,cortex-a72-pmu", .data = armv8_a72_pmu_init},