aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-05-09 13:34:19 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-25 18:49:43 -0400
commit03eff46ce31dbb186fea3eb2016e1c41f000db7e (patch)
tree0ec17a2a10901c30aa9086ba905a3fc9a175818b
parent0e0779da2233f2dfc85e9c3a6ea142476d326811 (diff)
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>
-rw-r--r--Documentation/devicetree/bindings/arm/pmu.txt1
-rw-r--r--arch/arm/kernel/perf_event_cpu.c1
-rw-r--r--arch/arm/kernel/perf_event_v7.c12
3 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
index fe5cef8976cb..75ef91d08f3b 100644
--- a/Documentation/devicetree/bindings/arm/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/pmu.txt
@@ -8,6 +8,7 @@ Required properties:
8 8
9- compatible : should be one of 9- compatible : should be one of
10 "arm,armv8-pmuv3" 10 "arm,armv8-pmuv3"
11 "arm,cortex-a17-pmu"
11 "arm,cortex-a15-pmu" 12 "arm,cortex-a15-pmu"
12 "arm,cortex-a12-pmu" 13 "arm,cortex-a12-pmu"
13 "arm,cortex-a9-pmu" 14 "arm,cortex-a9-pmu"
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 51798d7854ac..a71ae1523620 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -221,6 +221,7 @@ static struct notifier_block cpu_pmu_hotplug_notifier = {
221 * PMU platform driver and devicetree bindings. 221 * PMU platform driver and devicetree bindings.
222 */ 222 */
223static struct of_device_id cpu_pmu_of_device_ids[] = { 223static struct of_device_id cpu_pmu_of_device_ids[] = {
224 {.compatible = "arm,cortex-a17-pmu", .data = armv7_a17_pmu_init},
224 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 225 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init},
225 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init}, 226 {.compatible = "arm,cortex-a12-pmu", .data = armv7_a12_pmu_init},
226 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, 227 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init},
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index f4ef3981ed02..2037f7205987 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -1599,6 +1599,13 @@ static int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu)
1599 return 0; 1599 return 0;
1600} 1600}
1601 1601
1602static 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 * Krait Performance Monitor Region Event Selection Register (PMRESRn) 1610 * Krait Performance Monitor Region Event Selection Register (PMRESRn)
1604 * 1611 *
@@ -2021,6 +2028,11 @@ static inline int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu)
2021 return -ENODEV; 2028 return -ENODEV;
2022} 2029}
2023 2030
2031static inline int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu)
2032{
2033 return -ENODEV;
2034}
2035
2024static inline int krait_pmu_init(struct arm_pmu *cpu_pmu) 2036static inline int krait_pmu_init(struct arm_pmu *cpu_pmu)
2025{ 2037{
2026 return -ENODEV; 2038 return -ENODEV;