All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 12:49 ` memeka
  0 siblings, 0 replies; 12+ messages in thread
From: memeka @ 2017-10-20 12:49 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, kgene, krzk, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Marian Mihailescu, Willy Wolff

From: Marian Mihailescu <mihailescu2m@gmail.com>

Enable support for ARM Performance Monitoring Units available in Cortex-A7
and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).

Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Tested with perf on Odroid XU4 (Exynos5422):
armv7_cortex_a7 PMU driver: 5 counters available
armv7_cortex_a15 PMU driver: 7 counters available

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
Signed-off-by: Willy Wolff <willy.mh.wolff@gmail.com>
---
 arch/arm/boot/dts/exynos5420.dtsi | 13 +++++++++++++
 arch/arm/boot/dts/exynos54xx.dtsi | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 02d2f89..468059e 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -695,6 +695,19 @@
 			iommus = <&sysmmu_jpeg1>;
 		};
 
+		arm-a15-pmu {
+			compatible = "arm,cortex-a15-pmu";
+			interrupt-parent = <&combiner>;
+			interrupts = <1 2>,
+				<7 0>,
+				<16 6>,
+				<19 2>;
+			interrupt-affinity = <&cpu4>,
+				<&cpu5>,
+				<&cpu6>,
+				<&cpu7>;
+		};
+
 		pmu_system_controller: system-controller@10040000 {
 			compatible = "samsung,exynos5420-pmu", "syscon";
 			reg = <0x10040000 0x5000>;
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 8ca4fef..8e007a4 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -79,6 +79,19 @@
 			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		arm-a7-pmu {
+			compatible = "arm,cortex-a7-pmu";
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-affinity = <&cpu0>,
+				<&cpu1>,
+				<&cpu2>,
+				<&cpu3>;
+		};
+
 		sss: sss@10830000 {
 			compatible = "samsung,exynos4210-secss";
 			reg = <0x10830000 0x300>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 12:49 ` memeka
  0 siblings, 0 replies; 12+ messages in thread
From: memeka @ 2017-10-20 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marian Mihailescu <mihailescu2m@gmail.com>

Enable support for ARM Performance Monitoring Units available in Cortex-A7
and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).

Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Tested with perf on Odroid XU4 (Exynos5422):
armv7_cortex_a7 PMU driver: 5 counters available
armv7_cortex_a15 PMU driver: 7 counters available

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
Signed-off-by: Willy Wolff <willy.mh.wolff@gmail.com>
---
 arch/arm/boot/dts/exynos5420.dtsi | 13 +++++++++++++
 arch/arm/boot/dts/exynos54xx.dtsi | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 02d2f89..468059e 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -695,6 +695,19 @@
 			iommus = <&sysmmu_jpeg1>;
 		};
 
+		arm-a15-pmu {
+			compatible = "arm,cortex-a15-pmu";
+			interrupt-parent = <&combiner>;
+			interrupts = <1 2>,
+				<7 0>,
+				<16 6>,
+				<19 2>;
+			interrupt-affinity = <&cpu4>,
+				<&cpu5>,
+				<&cpu6>,
+				<&cpu7>;
+		};
+
 		pmu_system_controller: system-controller at 10040000 {
 			compatible = "samsung,exynos5420-pmu", "syscon";
 			reg = <0x10040000 0x5000>;
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 8ca4fef..8e007a4 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -79,6 +79,19 @@
 			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		arm-a7-pmu {
+			compatible = "arm,cortex-a7-pmu";
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-affinity = <&cpu0>,
+				<&cpu1>,
+				<&cpu2>,
+				<&cpu3>;
+		};
+
 		sss: sss at 10830000 {
 			compatible = "samsung,exynos4210-secss";
 			reg = <0x10830000 0x300>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
  2017-10-21  7:24     ` Marian Mihailescu
@ 2017-10-21 20:14       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2017-10-21 20:14 UTC (permalink / raw)
  To: Marian Mihailescu
  Cc: Robin Murphy, Rob Herring, Mark Rutland, Russell King,
	Kukjin Kim, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On Sat, Oct 21, 2017 at 05:54:31PM +1030, Marian Mihailescu wrote:
> Hi Robin,
> 
> Apologies, I did not really check which cluster is described for the
> 5410 (since 5422 boots from the A7).
> 
> Should I define both pmu nodes (w/o interrupt affinity) in the
> exynos54xx,dtsi, and set the status property to "disabled"?
> And then add the interrupt affinity to the SoC variant, and enable
> them as required...

After putting it under common exynos54xx you would have to anyway
override/extend most of the nodes so I think there is no much sense for
that. Instead it should be in exynos5410.dtsi and exynos5422.dtsi.

> 
> The problem that I see however is that, while 5410 is easy to deal
> with (it has the cpus defined in exynos5420.dtsi for all boards), 542x
> variants have the cpus included in the board dts. So there would be
> the same pmu nodes with interrupt affinity copied in all 542x and 5800
> boards dts (and there are several of them), instead of being included
> in exynos542x.dtsi...

You mean exynos5420-cpus.dtsi, not board DTS?

For exynos542x/5800 you could indeed add it directly to
exynos542x-cpus.dtsi, following existing pattern about cpus (with
comment).


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-21 20:14       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2017-10-21 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Oct 21, 2017 at 05:54:31PM +1030, Marian Mihailescu wrote:
> Hi Robin,
> 
> Apologies, I did not really check which cluster is described for the
> 5410 (since 5422 boots from the A7).
> 
> Should I define both pmu nodes (w/o interrupt affinity) in the
> exynos54xx,dtsi, and set the status property to "disabled"?
> And then add the interrupt affinity to the SoC variant, and enable
> them as required...

After putting it under common exynos54xx you would have to anyway
override/extend most of the nodes so I think there is no much sense for
that. Instead it should be in exynos5410.dtsi and exynos5422.dtsi.

> 
> The problem that I see however is that, while 5410 is easy to deal
> with (it has the cpus defined in exynos5420.dtsi for all boards), 542x
> variants have the cpus included in the board dts. So there would be
> the same pmu nodes with interrupt affinity copied in all 542x and 5800
> boards dts (and there are several of them), instead of being included
> in exynos542x.dtsi...

You mean exynos5420-cpus.dtsi, not board DTS?

For exynos542x/5800 you could indeed add it directly to
exynos542x-cpus.dtsi, following existing pattern about cpus (with
comment).


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
  2017-10-20 16:15   ` Robin Murphy
@ 2017-10-21  7:24     ` Marian Mihailescu
  -1 siblings, 0 replies; 12+ messages in thread
From: Marian Mihailescu @ 2017-10-21  7:24 UTC (permalink / raw)
  To: Robin Murphy
  Cc: Rob Herring, Mark Rutland, Russell King, Kukjin Kim,
	Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

Hi Robin,

Apologies, I did not really check which cluster is described for the
5410 (since 5422 boots from the A7).

Should I define both pmu nodes (w/o interrupt affinity) in the
exynos54xx,dtsi, and set the status property to "disabled"?
And then add the interrupt affinity to the SoC variant, and enable
them as required...

The problem that I see however is that, while 5410 is easy to deal
with (it has the cpus defined in exynos5420.dtsi for all boards), 542x
variants have the cpus included in the board dts. So there would be
the same pmu nodes with interrupt affinity copied in all 542x and 5800
boards dts (and there are several of them), instead of being included
in exynos542x.dtsi...

Any thoughts about this?

Thanks,
Marian

Either I've been missing something or nothing has been going on. (K. E. Gordon)


On Sat, Oct 21, 2017 at 2:45 AM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 20/10/17 13:09, Marian Mihailescu wrote:
>> Hi,
>>
>> This patch enables support for ARM Performance Monitoring Units
>> available in Cortex-A7
>> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
>>
>> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
>> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.
>
> Huh? 5410 only has the *A15* cluster described (and for whatever reason
> mainline cannot bring up the A7 cluster even if you do add it).
>
> Also*, the interrupt affinity properties are bogus as presented - those
> will need to be delegated to the SoC-variant-specific dtsi files in the
> same manner as the "cpus" nodes, to cope with the different CPU numberings.
>
> Robin.
>
> *I'd like to have made this comment inline in the patch, but I can't :(
>
>> Tested with perf on Odroid XU4 (Exynos5422):
>> armv7_cortex_a7 PMU driver: 5 counters available
>> armv7_cortex_a15 PMU driver: 7 counters available
>>
>> Regards,
>> Marian
>>
>> --
>> Either I've been missing something or nothing has been going on. (K. E. Gordon)
>>
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-21  7:24     ` Marian Mihailescu
  0 siblings, 0 replies; 12+ messages in thread
From: Marian Mihailescu @ 2017-10-21  7:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robin,

Apologies, I did not really check which cluster is described for the
5410 (since 5422 boots from the A7).

Should I define both pmu nodes (w/o interrupt affinity) in the
exynos54xx,dtsi, and set the status property to "disabled"?
And then add the interrupt affinity to the SoC variant, and enable
them as required...

The problem that I see however is that, while 5410 is easy to deal
with (it has the cpus defined in exynos5420.dtsi for all boards), 542x
variants have the cpus included in the board dts. So there would be
the same pmu nodes with interrupt affinity copied in all 542x and 5800
boards dts (and there are several of them), instead of being included
in exynos542x.dtsi...

Any thoughts about this?

Thanks,
Marian

Either I've been missing something or nothing has been going on. (K. E. Gordon)


On Sat, Oct 21, 2017 at 2:45 AM, Robin Murphy <robin.murphy@arm.com> wrote:
> On 20/10/17 13:09, Marian Mihailescu wrote:
>> Hi,
>>
>> This patch enables support for ARM Performance Monitoring Units
>> available in Cortex-A7
>> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
>>
>> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
>> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.
>
> Huh? 5410 only has the *A15* cluster described (and for whatever reason
> mainline cannot bring up the A7 cluster even if you do add it).
>
> Also*, the interrupt affinity properties are bogus as presented - those
> will need to be delegated to the SoC-variant-specific dtsi files in the
> same manner as the "cpus" nodes, to cope with the different CPU numberings.
>
> Robin.
>
> *I'd like to have made this comment inline in the patch, but I can't :(
>
>> Tested with perf on Odroid XU4 (Exynos5422):
>> armv7_cortex_a7 PMU driver: 5 counters available
>> armv7_cortex_a15 PMU driver: 7 counters available
>>
>> Regards,
>> Marian
>>
>> --
>> Either I've been missing something or nothing has been going on. (K. E. Gordon)
>>
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
  2017-10-20 12:09 ` Marian Mihailescu
@ 2017-10-20 16:15   ` Robin Murphy
  -1 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2017-10-20 16:15 UTC (permalink / raw)
  To: Marian Mihailescu, Rob Herring, Mark Rutland, Russell King,
	Kukjin Kim, Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On 20/10/17 13:09, Marian Mihailescu wrote:
> Hi,
> 
> This patch enables support for ARM Performance Monitoring Units
> available in Cortex-A7
> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
> 
> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Huh? 5410 only has the *A15* cluster described (and for whatever reason
mainline cannot bring up the A7 cluster even if you do add it).

Also*, the interrupt affinity properties are bogus as presented - those
will need to be delegated to the SoC-variant-specific dtsi files in the
same manner as the "cpus" nodes, to cope with the different CPU numberings.

Robin.

*I'd like to have made this comment inline in the patch, but I can't :(

> Tested with perf on Odroid XU4 (Exynos5422):
> armv7_cortex_a7 PMU driver: 5 counters available
> armv7_cortex_a15 PMU driver: 7 counters available
> 
> Regards,
> Marian
> 
> --
> Either I've been missing something or nothing has been going on. (K. E. Gordon)
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 16:15   ` Robin Murphy
  0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2017-10-20 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 20/10/17 13:09, Marian Mihailescu wrote:
> Hi,
> 
> This patch enables support for ARM Performance Monitoring Units
> available in Cortex-A7
> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
> 
> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Huh? 5410 only has the *A15* cluster described (and for whatever reason
mainline cannot bring up the A7 cluster even if you do add it).

Also*, the interrupt affinity properties are bogus as presented - those
will need to be delegated to the SoC-variant-specific dtsi files in the
same manner as the "cpus" nodes, to cope with the different CPU numberings.

Robin.

*I'd like to have made this comment inline in the patch, but I can't :(

> Tested with perf on Odroid XU4 (Exynos5422):
> armv7_cortex_a7 PMU driver: 5 counters available
> armv7_cortex_a15 PMU driver: 7 counters available
> 
> Regards,
> Marian
> 
> --
> Either I've been missing something or nothing has been going on. (K. E. Gordon)
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
  2017-10-20 12:09 ` Marian Mihailescu
@ 2017-10-20 12:21   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2017-10-20 12:21 UTC (permalink / raw)
  To: Marian Mihailescu
  Cc: Rob Herring, Mark Rutland, Russell King, Kukjin Kim, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On Fri, Oct 20, 2017 at 2:09 PM, Marian Mihailescu
<mihailescu2m@gmail.com> wrote:
> Hi,
>
> This patch enables support for ARM Performance Monitoring Units
> available in Cortex-A7
> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
>
> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.
>
> Tested with perf on Odroid XU4 (Exynos5422):
> armv7_cortex_a7 PMU driver: 5 counters available
> armv7_cortex_a15 PMU driver: 7 counters available

Please send this as simple text mail, not a multi-part message with
attachments. I cannot comment inline for multi-part, not mentioning
that patch is not being displayed at all. Probably this is also the
reason why patch is not present in patchwork
(https://patchwork.kernel.org/project/linux-samsung-soc/list/).

The easiest is to just run "git format-patch -1" and then "git
send-email --to .. --cc .. 0001-*".

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 12:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2017-10-20 12:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 20, 2017 at 2:09 PM, Marian Mihailescu
<mihailescu2m@gmail.com> wrote:
> Hi,
>
> This patch enables support for ARM Performance Monitoring Units
> available in Cortex-A7
> and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).
>
> Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
> so the Cortex-A15 PMU is defined in the exynos5420 device tree file.
>
> Tested with perf on Odroid XU4 (Exynos5422):
> armv7_cortex_a7 PMU driver: 5 counters available
> armv7_cortex_a15 PMU driver: 7 counters available

Please send this as simple text mail, not a multi-part message with
attachments. I cannot comment inline for multi-part, not mentioning
that patch is not being displayed at all. Probably this is also the
reason why patch is not present in patchwork
(https://patchwork.kernel.org/project/linux-samsung-soc/list/).

The easiest is to just run "git format-patch -1" and then "git
send-email --to .. --cc .. 0001-*".

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 12:09 ` Marian Mihailescu
  0 siblings, 0 replies; 12+ messages in thread
From: Marian Mihailescu @ 2017-10-20 12:09 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Russell King, Kukjin Kim,
	Krzysztof Kozlowski, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

Hi,

This patch enables support for ARM Performance Monitoring Units
available in Cortex-A7
and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).

Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Tested with perf on Odroid XU4 (Exynos5422):
armv7_cortex_a7 PMU driver: 5 counters available
armv7_cortex_a15 PMU driver: 7 counters available

Regards,
Marian

--
Either I've been missing something or nothing has been going on. (K. E. Gordon)

[-- Attachment #2: 0001-ARM-dts-exynos-add-cpu-perf-counters-to-Exynos54xx-b.patch --]
[-- Type: application/octet-stream, Size: 2272 bytes --]

From: Marian Mihailescu <mihailescu2m@gmail.com>
Date: Fri, 20 Oct 2017 20:09:32 +1030
Subject: [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards

Enable support for ARM Performance Monitoring Units available in Cortex-A7
and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).

Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Tested with perf on Odroid XU4 (Exynos5422):
armv7_cortex_a7 PMU driver: 5 counters available
armv7_cortex_a15 PMU driver: 7 counters available

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
Signed-off-by: Willy Wolff <willy.mh.wolff@gmail.com>
---
 arch/arm/boot/dts/exynos5420.dtsi | 13 +++++++++++++
 arch/arm/boot/dts/exynos54xx.dtsi | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 02d2f89..468059e 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -695,6 +695,19 @@
 			iommus = <&sysmmu_jpeg1>;
 		};
 
+		arm-a15-pmu {
+			compatible = "arm,cortex-a15-pmu";
+			interrupt-parent = <&combiner>;
+			interrupts = <1 2>,
+				<7 0>,
+				<16 6>,
+				<19 2>;
+			interrupt-affinity = <&cpu4>,
+				<&cpu5>,
+				<&cpu6>,
+				<&cpu7>;
+		};
+
 		pmu_system_controller: system-controller@10040000 {
 			compatible = "samsung,exynos5420-pmu", "syscon";
 			reg = <0x10040000 0x5000>;
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 8ca4fef..8e007a4 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -79,6 +79,19 @@
 			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		arm-a7-pmu {
+			compatible = "arm,cortex-a7-pmu";
+			interrupt-parent = <&gic>;
+			interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
+				<GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-affinity = <&cpu0>,
+				<&cpu1>,
+				<&cpu2>,
+				<&cpu3>;
+		};
+
 		sss: sss@10830000 {
 			compatible = "samsung,exynos4210-secss";
 			reg = <0x10830000 0x300>;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards
@ 2017-10-20 12:09 ` Marian Mihailescu
  0 siblings, 0 replies; 12+ messages in thread
From: Marian Mihailescu @ 2017-10-20 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This patch enables support for ARM Performance Monitoring Units
available in Cortex-A7
and Cortex-A15 CPU cores for Exynos54xx SoCs (5410, 5420 and 5422/5800).

Exynos5410 currently has only Cortex-A7 nodes defined in the device tree,
so the Cortex-A15 PMU is defined in the exynos5420 device tree file.

Tested with perf on Odroid XU4 (Exynos5422):
armv7_cortex_a7 PMU driver: 5 counters available
armv7_cortex_a15 PMU driver: 7 counters available

Regards,
Marian

--
Either I've been missing something or nothing has been going on. (K. E. Gordon)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-dts-exynos-add-cpu-perf-counters-to-Exynos54xx-b.patch
Type: application/octet-stream
Size: 2272 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171020/d5dc1f5c/attachment.obj>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-21 20:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20 12:49 [PATCH] ARM: dts: exynos: add cpu perf counters to Exynos54xx boards memeka
2017-10-20 12:49 ` memeka
  -- strict thread matches above, loose matches on Subject: below --
2017-10-20 12:09 Marian Mihailescu
2017-10-20 12:09 ` Marian Mihailescu
2017-10-20 12:21 ` Krzysztof Kozlowski
2017-10-20 12:21   ` Krzysztof Kozlowski
2017-10-20 16:15 ` Robin Murphy
2017-10-20 16:15   ` Robin Murphy
2017-10-21  7:24   ` Marian Mihailescu
2017-10-21  7:24     ` Marian Mihailescu
2017-10-21 20:14     ` Krzysztof Kozlowski
2017-10-21 20:14       ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.