Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1337530 > unrolled thread
| Started by | Jan Glauber <jglauber@cavium.com> |
|---|---|
| First post | 2016-02-18 18:00 +0100 |
| Last post | 2016-02-18 18:00 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v4 0/5] Cavium ThunderX PMU support Jan Glauber <jglauber@cavium.com> - 2016-02-18 18:00 +0100
[PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU Jan Glauber <jglauber@cavium.com> - 2016-02-18 18:00 +0100
Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU Will Deacon <will.deacon@arm.com> - 2016-02-18 18:40 +0100
Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU David Daney <ddaney@caviumnetworks.com> - 2016-02-18 19:40 +0100
Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU Jan Glauber <jan.glauber@caviumnetworks.com> - 2016-02-22 13:50 +0100
[PATCH v4 1/5] arm64/perf: Rename Cortex A57 events Jan Glauber <jglauber@cavium.com> - 2016-02-18 18:00 +0100
| From | Jan Glauber <jglauber@cavium.com> |
|---|---|
| Date | 2016-02-18 18:00 +0100 |
| Subject | [PATCH v4 0/5] Cavium ThunderX PMU support |
| Message-ID | <r3A5R-8tj-13@gated-at.bofh.it> |
Hi, this should address all comments. With the simplified event mask arm isn't touched anymore and also the cpuid check vanished. Changes to v3: - renamed A57 events to IMPDEF - changed comment about 64 bit cycle counter overflow - unconditionally increase event mask Changes to v2: - fixed arm compile errors Changes to v1: - renamed thunderx dt pmu binding to thunder Jan -------------------------------------------------------- Jan Glauber (5): arm64/perf: Rename Cortex A57 events arm64/perf: Add Cavium ThunderX PMU support arm64: dts: Add Cavium ThunderX specific PMU arm64/perf: Enable PMCR long cycle counter bit arm64/perf: Extend event mask for ARMv8.1 Documentation/devicetree/bindings/arm/pmu.txt | 1 + arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 5 ++ arch/arm64/kernel/perf_event.c | 120 +++++++++++++++++++++----- 3 files changed, 105 insertions(+), 21 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Jan Glauber <jglauber@cavium.com> |
|---|---|
| Date | 2016-02-18 18:00 +0100 |
| Subject | [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU |
| Message-ID | <r3A5R-8tj-27@gated-at.bofh.it> |
| In reply to | #1337530 |
Add a compatible string for the Cavium ThunderX PMU.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
---
Documentation/devicetree/bindings/arm/pmu.txt | 1 +
arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
index 5651883..d3999a1 100644
--- a/Documentation/devicetree/bindings/arm/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/pmu.txt
@@ -25,6 +25,7 @@ Required properties:
"qcom,scorpion-pmu"
"qcom,scorpion-mp-pmu"
"qcom,krait-pmu"
+ "cavium,thunder-pmu"
- interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu
interrupt (PPI) then 1 interrupt should be specified.
diff --git a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
index 9cb7cf9..2eb9b22 100644
--- a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
+++ b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
@@ -360,6 +360,11 @@
<1 10 0xff01>;
};
+ pmu {
+ compatible = "cavium,thunder-pmu", "arm,armv8-pmuv3";
+ interrupts = <1 7 4>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <2>;
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2016-02-18 18:40 +0100 |
| Subject | Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU |
| Message-ID | <r3AIy-yZ-17@gated-at.bofh.it> |
| In reply to | #1337532 |
On Thu, Feb 18, 2016 at 05:50:12PM +0100, Jan Glauber wrote:
> Add a compatible string for the Cavium ThunderX PMU.
Stupid question, but is "thunder" the name of the CPU or the SoC or ...?
Whatever we use to describe the PMU, should probably also identify the
CPU uniquely.
Will
> Signed-off-by: Jan Glauber <jglauber@cavium.com>
> ---
> Documentation/devicetree/bindings/arm/pmu.txt | 1 +
> arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 5 +++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
> index 5651883..d3999a1 100644
> --- a/Documentation/devicetree/bindings/arm/pmu.txt
> +++ b/Documentation/devicetree/bindings/arm/pmu.txt
> @@ -25,6 +25,7 @@ Required properties:
> "qcom,scorpion-pmu"
> "qcom,scorpion-mp-pmu"
> "qcom,krait-pmu"
> + "cavium,thunder-pmu"
> - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu
> interrupt (PPI) then 1 interrupt should be specified.
>
> diff --git a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> index 9cb7cf9..2eb9b22 100644
> --- a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> +++ b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> @@ -360,6 +360,11 @@
> <1 10 0xff01>;
> };
>
> + pmu {
> + compatible = "cavium,thunder-pmu", "arm,armv8-pmuv3";
> + interrupts = <1 7 4>;
> + };
> +
> soc {
> compatible = "simple-bus";
> #address-cells = <2>;
> --
> 1.9.1
>
[toc] | [prev] | [next] | [standalone]
| From | David Daney <ddaney@caviumnetworks.com> |
|---|---|
| Date | 2016-02-18 19:40 +0100 |
| Subject | Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU |
| Message-ID | <r3BEC-1ga-11@gated-at.bofh.it> |
| In reply to | #1337570 |
On 02/18/2016 09:32 AM, Will Deacon wrote:
> On Thu, Feb 18, 2016 at 05:50:12PM +0100, Jan Glauber wrote:
>> Add a compatible string for the Cavium ThunderX PMU.
>
> Stupid question, but is "thunder" the name of the CPU or the SoC or ...?
At a high level Cavium ThunderX (tm) is a family of SoCs. Since the SoC
contains many different functional blocks ...
>
> Whatever we use to describe the PMU, should probably also identify the
> CPU uniquely.
... In the context of this patch, "cavium,thunder-pmu" refers to the PMU
of Cavium's implementation of the ARMv8 Processing Element (PE)
specification (i.e. the CPU), as found on the CN88XX family of SoCs.
If we think of this in terms of MIDR_EL1, That would be:
Implementer: 0x43
PartNum: 0xA1
>
> Will
>
>> Signed-off-by: Jan Glauber <jglauber@cavium.com>
>> ---
>> Documentation/devicetree/bindings/arm/pmu.txt | 1 +
>> arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 5 +++++
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
>> index 5651883..d3999a1 100644
>> --- a/Documentation/devicetree/bindings/arm/pmu.txt
>> +++ b/Documentation/devicetree/bindings/arm/pmu.txt
>> @@ -25,6 +25,7 @@ Required properties:
>> "qcom,scorpion-pmu"
>> "qcom,scorpion-mp-pmu"
>> "qcom,krait-pmu"
>> + "cavium,thunder-pmu"
>> - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu
>> interrupt (PPI) then 1 interrupt should be specified.
>>
>> diff --git a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
>> index 9cb7cf9..2eb9b22 100644
>> --- a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
>> +++ b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
>> @@ -360,6 +360,11 @@
>> <1 10 0xff01>;
>> };
>>
>> + pmu {
>> + compatible = "cavium,thunder-pmu", "arm,armv8-pmuv3";
>> + interrupts = <1 7 4>;
>> + };
>> +
>> soc {
>> compatible = "simple-bus";
>> #address-cells = <2>;
>> --
>> 1.9.1
>>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
[toc] | [prev] | [next] | [standalone]
| From | Jan Glauber <jan.glauber@caviumnetworks.com> |
|---|---|
| Date | 2016-02-22 13:50 +0100 |
| Subject | Re: [PATCH v4 3/5] arm64: dts: Add Cavium ThunderX specific PMU |
| Message-ID | <r4Y66-5Uf-5@gated-at.bofh.it> |
| In reply to | #1337570 |
On Thu, Feb 18, 2016 at 05:32:48PM +0000, Will Deacon wrote:
> On Thu, Feb 18, 2016 at 05:50:12PM +0100, Jan Glauber wrote:
> > Add a compatible string for the Cavium ThunderX PMU.
>
> Stupid question, but is "thunder" the name of the CPU or the SoC or ...?
>
> Whatever we use to describe the PMU, should probably also identify the
> CPU uniquely.
The CPU is currently:
compatible = "cavium,thunder", "arm,armv8";
We clearly need better names in case of a subsequent CPU, but for now
I think we should stick to the existing name.
Jan
> Will
>
> > Signed-off-by: Jan Glauber <jglauber@cavium.com>
> > ---
> > Documentation/devicetree/bindings/arm/pmu.txt | 1 +
> > arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 5 +++++
> > 2 files changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
> > index 5651883..d3999a1 100644
> > --- a/Documentation/devicetree/bindings/arm/pmu.txt
> > +++ b/Documentation/devicetree/bindings/arm/pmu.txt
> > @@ -25,6 +25,7 @@ Required properties:
> > "qcom,scorpion-pmu"
> > "qcom,scorpion-mp-pmu"
> > "qcom,krait-pmu"
> > + "cavium,thunder-pmu"
> > - interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu
> > interrupt (PPI) then 1 interrupt should be specified.
> >
> > diff --git a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> > index 9cb7cf9..2eb9b22 100644
> > --- a/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> > +++ b/arch/arm64/boot/dts/cavium/thunder-88xx.dtsi
> > @@ -360,6 +360,11 @@
> > <1 10 0xff01>;
> > };
> >
> > + pmu {
> > + compatible = "cavium,thunder-pmu", "arm,armv8-pmuv3";
> > + interrupts = <1 7 4>;
> > + };
> > +
> > soc {
> > compatible = "simple-bus";
> > #address-cells = <2>;
> > --
> > 1.9.1
> >
[toc] | [prev] | [next] | [standalone]
| From | Jan Glauber <jglauber@cavium.com> |
|---|---|
| Date | 2016-02-18 18:00 +0100 |
| Subject | [PATCH v4 1/5] arm64/perf: Rename Cortex A57 events |
| Message-ID | <r3A5S-8tj-35@gated-at.bofh.it> |
| In reply to | #1337530 |
The implemented Cortex A57 events are strictly-speaking not
A57 specific. They are ARM recommended implementation defined events
and can be found on other ARMv8 SOCs like Cavium ThunderX too.
Therefore rename these events to allow using them in other
implementations too.
Signed-off-by: Jan Glauber <jglauber@cavium.com>
---
arch/arm64/kernel/perf_event.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index f7ab14c..2adbcb5 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -90,13 +90,13 @@
/* ARMv8 Cortex-A53 specific event types. */
#define ARMV8_A53_PERFCTR_PREFETCH_LINEFILL 0xC2
-/* ARMv8 Cortex-A57 and Cortex-A72 specific event types. */
-#define ARMV8_A57_PERFCTR_L1_DCACHE_ACCESS_LD 0x40
-#define ARMV8_A57_PERFCTR_L1_DCACHE_ACCESS_ST 0x41
-#define ARMV8_A57_PERFCTR_L1_DCACHE_REFILL_LD 0x42
-#define ARMV8_A57_PERFCTR_L1_DCACHE_REFILL_ST 0x43
-#define ARMV8_A57_PERFCTR_DTLB_REFILL_LD 0x4c
-#define ARMV8_A57_PERFCTR_DTLB_REFILL_ST 0x4d
+/* ARMv8 implementation defined event types. */
+#define ARMV8_IMPDEF_PERFCTR_L1_DCACHE_ACCESS_LD 0x40
+#define ARMV8_IMPDEF_PERFCTR_L1_DCACHE_ACCESS_ST 0x41
+#define ARMV8_IMPDEF_PERFCTR_L1_DCACHE_REFILL_LD 0x42
+#define ARMV8_IMPDEF_PERFCTR_L1_DCACHE_REFILL_ST 0x43
+#define ARMV8_IMPDEF_PERFCTR_DTLB_REFILL_LD 0x4c
+#define ARMV8_IMPDEF_PERFCTR_DTLB_REFILL_ST 0x4d
/* PMUv3 HW events mapping. */
static const unsigned armv8_pmuv3_perf_map[PERF_COUNT_HW_MAX] = {
@@ -174,16 +174,16 @@ static const unsigned armv8_a57_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
[PERF_COUNT_HW_CACHE_RESULT_MAX] = {
PERF_CACHE_MAP_ALL_UNSUPPORTED,
- [C(L1D)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_A57_PERFCTR_L1_DCACHE_ACCESS_LD,
- [C(L1D)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_A57_PERFCTR_L1_DCACHE_REFILL_LD,
- [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_A57_PERFCTR_L1_DCACHE_ACCESS_ST,
- [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_A57_PERFCTR_L1_DCACHE_REFILL_ST,
+ [C(L1D)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1_DCACHE_ACCESS_LD,
+ [C(L1D)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1_DCACHE_REFILL_LD,
+ [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_IMPDEF_PERFCTR_L1_DCACHE_ACCESS_ST,
+ [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_L1_DCACHE_REFILL_ST,
[C(L1I)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_L1_ICACHE_ACCESS,
[C(L1I)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_L1_ICACHE_REFILL,
- [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_A57_PERFCTR_DTLB_REFILL_LD,
- [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_A57_PERFCTR_DTLB_REFILL_ST,
+ [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_DTLB_REFILL_LD,
+ [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_IMPDEF_PERFCTR_DTLB_REFILL_ST,
[C(ITLB)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_ITLB_REFILL,
--
1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web