Skip to content

Commit 29cc4ce

Browse files
rmurphy-armwilldeacon
authored andcommitted
arm64: perf: Support new DT compatibles
Add support for matching the new PMUs. For now, this just wires them up as generic PMUv3 such that people writing DTs for new SoCs can do the right thing, and at least have architectural and raw events be usable. We can come back and fill in event maps for sysfs and/or perf tools at a later date. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent e424b17 commit 29cc4ce

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

arch/arm64/kernel/perf_event.c

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,12 @@ static int armv8_pmuv3_init(struct arm_pmu *cpu_pmu)
991991
armv8_pmuv3_map_event, NULL, NULL);
992992
}
993993

994+
static int armv8_a34_pmu_init(struct arm_pmu *cpu_pmu)
995+
{
996+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a34",
997+
armv8_pmuv3_map_event, NULL, NULL);
998+
}
999+
9941000
static int armv8_a35_pmu_init(struct arm_pmu *cpu_pmu)
9951001
{
9961002
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a35",
@@ -1003,12 +1009,24 @@ static int armv8_a53_pmu_init(struct arm_pmu *cpu_pmu)
10031009
armv8_a53_map_event, NULL, NULL);
10041010
}
10051011

1012+
static int armv8_a55_pmu_init(struct arm_pmu *cpu_pmu)
1013+
{
1014+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a55",
1015+
armv8_pmuv3_map_event, NULL, NULL);
1016+
}
1017+
10061018
static int armv8_a57_pmu_init(struct arm_pmu *cpu_pmu)
10071019
{
10081020
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a57",
10091021
armv8_a57_map_event, NULL, NULL);
10101022
}
10111023

1024+
static int armv8_a65_pmu_init(struct arm_pmu *cpu_pmu)
1025+
{
1026+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a65",
1027+
armv8_pmuv3_map_event, NULL, NULL);
1028+
}
1029+
10121030
static int armv8_a72_pmu_init(struct arm_pmu *cpu_pmu)
10131031
{
10141032
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a72",
@@ -1021,6 +1039,36 @@ static int armv8_a73_pmu_init(struct arm_pmu *cpu_pmu)
10211039
armv8_a73_map_event, NULL, NULL);
10221040
}
10231041

1042+
static int armv8_a75_pmu_init(struct arm_pmu *cpu_pmu)
1043+
{
1044+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a75",
1045+
armv8_pmuv3_map_event, NULL, NULL);
1046+
}
1047+
1048+
static int armv8_a76_pmu_init(struct arm_pmu *cpu_pmu)
1049+
{
1050+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a76",
1051+
armv8_pmuv3_map_event, NULL, NULL);
1052+
}
1053+
1054+
static int armv8_a77_pmu_init(struct arm_pmu *cpu_pmu)
1055+
{
1056+
return armv8_pmu_init(cpu_pmu, "armv8_cortex_a77",
1057+
armv8_pmuv3_map_event, NULL, NULL);
1058+
}
1059+
1060+
static int armv8_e1_pmu_init(struct arm_pmu *cpu_pmu)
1061+
{
1062+
return armv8_pmu_init(cpu_pmu, "armv8_neoverse_e1",
1063+
armv8_pmuv3_map_event, NULL, NULL);
1064+
}
1065+
1066+
static int armv8_n1_pmu_init(struct arm_pmu *cpu_pmu)
1067+
{
1068+
return armv8_pmu_init(cpu_pmu, "armv8_neoverse_n1",
1069+
armv8_pmuv3_map_event, NULL, NULL);
1070+
}
1071+
10241072
static int armv8_thunder_pmu_init(struct arm_pmu *cpu_pmu)
10251073
{
10261074
return armv8_pmu_init(cpu_pmu, "armv8_cavium_thunder",
@@ -1035,11 +1083,19 @@ static int armv8_vulcan_pmu_init(struct arm_pmu *cpu_pmu)
10351083

10361084
static const struct of_device_id armv8_pmu_of_device_ids[] = {
10371085
{.compatible = "arm,armv8-pmuv3", .data = armv8_pmuv3_init},
1086+
{.compatible = "arm,cortex-a34-pmu", .data = armv8_a34_pmu_init},
10381087
{.compatible = "arm,cortex-a35-pmu", .data = armv8_a35_pmu_init},
10391088
{.compatible = "arm,cortex-a53-pmu", .data = armv8_a53_pmu_init},
1089+
{.compatible = "arm,cortex-a55-pmu", .data = armv8_a55_pmu_init},
10401090
{.compatible = "arm,cortex-a57-pmu", .data = armv8_a57_pmu_init},
1091+
{.compatible = "arm,cortex-a65-pmu", .data = armv8_a65_pmu_init},
10411092
{.compatible = "arm,cortex-a72-pmu", .data = armv8_a72_pmu_init},
10421093
{.compatible = "arm,cortex-a73-pmu", .data = armv8_a73_pmu_init},
1094+
{.compatible = "arm,cortex-a75-pmu", .data = armv8_a75_pmu_init},
1095+
{.compatible = "arm,cortex-a76-pmu", .data = armv8_a76_pmu_init},
1096+
{.compatible = "arm,cortex-a77-pmu", .data = armv8_a77_pmu_init},
1097+
{.compatible = "arm,neoverse-e1-pmu", .data = armv8_e1_pmu_init},
1098+
{.compatible = "arm,neoverse-n1-pmu", .data = armv8_n1_pmu_init},
10431099
{.compatible = "cavium,thunder-pmu", .data = armv8_thunder_pmu_init},
10441100
{.compatible = "brcm,vulcan-pmu", .data = armv8_vulcan_pmu_init},
10451101
{},

0 commit comments

Comments
 (0)