From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Samuel Holland <samuel@sholland.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Inochi Amaoto <inochiama@outlook.com>,
Heiko Stuebner <heiko@sntech.de>, Wei Fu <wefu@redhat.com>,
Pei Chen <cp0613@linux.alibaba.com>,
Wenhan Chen <chenwenhan.cwh@alibaba-inc.com>,
Guo Ren <guoren@kernel.org>,
Inochi Amaoto <inochiama@outlook.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] riscv: dts: allwinner: d1: Add PMU event node
Date: Tue, 05 Sep 2023 22:31:19 +0200 [thread overview]
Message-ID: <3760158.kQq0lBPeGt@archlinux> (raw)
In-Reply-To: <IA1PR20MB49534918FCA69399CE2E0C53BBE0A@IA1PR20MB4953.namprd20.prod.outlook.com>
On Monday, August 28, 2023 6:30:22 AM CEST Inochi Amaoto wrote:
> D1 has several pmu events supported by opensbi.
> These events can be used by perf for profiling.
>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
> Link: https://dl.linux-sunxi.org/D1/Xuantie_C906_R1S0_User_Manual.pdf
> Link:
> https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/
> pmu/rtl/aq_hpcp_top.v#L657
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
What's the status of dependencies? Are they merged?
Best regards,
Jernej
> ---
> changed from v3:
> 1. remove wrong event mapping of 0x0000a
> 2. add reference url of c906 events implementation (D1 only support events
> described in R1S0 user manual, but event mapping is the same)
>
> changed from v2:
> 1. move pmu node from /soc to / to avoid warnings when checking.
>
> The meaning of T-HEAD events can be found in this pending patch:
> https://lore.kernel.org/linux-perf-users/IA1PR20MB4953DD82D0116EC291C21777BB
> E2A@IA1PR20MB4953.namprd20.prod.outlook.com
>
> The patch above also provides a example that shows how to setup
> environment and use perf with T-HEAD events.
> ---
> arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi index
> 8275630af977..53a984d78e3f 100644
> --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> @@ -73,4 +73,43 @@ plic: interrupt-controller@10000000 {
> #interrupt-cells = <2>;
> };
> };
> +
> + pmu {
> + compatible = "riscv,pmu";
> + riscv,event-to-mhpmcounters =
> + <0x00003 0x00003 0x00000008>,
> + <0x00004 0x00004 0x00000010>,
> + <0x00005 0x00005 0x00000200>,
> + <0x00006 0x00006 0x00000100>,
> + <0x10000 0x10000 0x00004000>,
> + <0x10001 0x10001 0x00008000>,
> + <0x10002 0x10002 0x00010000>,
> + <0x10003 0x10003 0x00020000>,
> + <0x10019 0x10019 0x00000040>,
> + <0x10021 0x10021 0x00000020>;
> + riscv,event-to-mhpmevent =
> + <0x00003 0x00000000 0x00000001>,
> + <0x00004 0x00000000 0x00000002>,
> + <0x00005 0x00000000 0x00000007>,
> + <0x00006 0x00000000 0x00000006>,
> + <0x10000 0x00000000 0x0000000c>,
> + <0x10001 0x00000000 0x0000000d>,
> + <0x10002 0x00000000 0x0000000e>,
> + <0x10003 0x00000000 0x0000000f>,
> + <0x10019 0x00000000 0x00000004>,
> + <0x10021 0x00000000 0x00000003>;
> + riscv,raw-event-to-mhpmcounters =
> + <0x00000000 0x00000001 0xffffffff 0xffffffff
0x00000008>,
> + <0x00000000 0x00000002 0xffffffff 0xffffffff
0x00000010>,
> + <0x00000000 0x00000003 0xffffffff 0xffffffff
0x00000020>,
> + <0x00000000 0x00000004 0xffffffff 0xffffffff
0x00000040>,
> + <0x00000000 0x00000005 0xffffffff 0xffffffff
0x00000080>,
> + <0x00000000 0x00000006 0xffffffff 0xffffffff
0x00000100>,
> + <0x00000000 0x00000007 0xffffffff 0xffffffff
0x00000200>,
> + <0x00000000 0x0000000b 0xffffffff 0xffffffff
0x00002000>,
> + <0x00000000 0x0000000c 0xffffffff 0xffffffff
0x00004000>,
> + <0x00000000 0x0000000d 0xffffffff 0xffffffff
0x00008000>,
> + <0x00000000 0x0000000e 0xffffffff 0xffffffff
0x00010000>,
> + <0x00000000 0x0000000f 0xffffffff 0xffffffff
0x00020000>;
> + };
> };
> --
> 2.42.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Samuel Holland <samuel@sholland.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Inochi Amaoto <inochiama@outlook.com>,
Heiko Stuebner <heiko@sntech.de>, Wei Fu <wefu@redhat.com>,
Pei Chen <cp0613@linux.alibaba.com>,
Wenhan Chen <chenwenhan.cwh@alibaba-inc.com>,
Guo Ren <guoren@kernel.org>,
Inochi Amaoto <inochiama@outlook.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] riscv: dts: allwinner: d1: Add PMU event node
Date: Tue, 05 Sep 2023 22:31:19 +0200 [thread overview]
Message-ID: <3760158.kQq0lBPeGt@archlinux> (raw)
In-Reply-To: <IA1PR20MB49534918FCA69399CE2E0C53BBE0A@IA1PR20MB4953.namprd20.prod.outlook.com>
On Monday, August 28, 2023 6:30:22 AM CEST Inochi Amaoto wrote:
> D1 has several pmu events supported by opensbi.
> These events can be used by perf for profiling.
>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
> Link: https://dl.linux-sunxi.org/D1/Xuantie_C906_R1S0_User_Manual.pdf
> Link:
> https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/
> pmu/rtl/aq_hpcp_top.v#L657
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
What's the status of dependencies? Are they merged?
Best regards,
Jernej
> ---
> changed from v3:
> 1. remove wrong event mapping of 0x0000a
> 2. add reference url of c906 events implementation (D1 only support events
> described in R1S0 user manual, but event mapping is the same)
>
> changed from v2:
> 1. move pmu node from /soc to / to avoid warnings when checking.
>
> The meaning of T-HEAD events can be found in this pending patch:
> https://lore.kernel.org/linux-perf-users/IA1PR20MB4953DD82D0116EC291C21777BB
> E2A@IA1PR20MB4953.namprd20.prod.outlook.com
>
> The patch above also provides a example that shows how to setup
> environment and use perf with T-HEAD events.
> ---
> arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi index
> 8275630af977..53a984d78e3f 100644
> --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> @@ -73,4 +73,43 @@ plic: interrupt-controller@10000000 {
> #interrupt-cells = <2>;
> };
> };
> +
> + pmu {
> + compatible = "riscv,pmu";
> + riscv,event-to-mhpmcounters =
> + <0x00003 0x00003 0x00000008>,
> + <0x00004 0x00004 0x00000010>,
> + <0x00005 0x00005 0x00000200>,
> + <0x00006 0x00006 0x00000100>,
> + <0x10000 0x10000 0x00004000>,
> + <0x10001 0x10001 0x00008000>,
> + <0x10002 0x10002 0x00010000>,
> + <0x10003 0x10003 0x00020000>,
> + <0x10019 0x10019 0x00000040>,
> + <0x10021 0x10021 0x00000020>;
> + riscv,event-to-mhpmevent =
> + <0x00003 0x00000000 0x00000001>,
> + <0x00004 0x00000000 0x00000002>,
> + <0x00005 0x00000000 0x00000007>,
> + <0x00006 0x00000000 0x00000006>,
> + <0x10000 0x00000000 0x0000000c>,
> + <0x10001 0x00000000 0x0000000d>,
> + <0x10002 0x00000000 0x0000000e>,
> + <0x10003 0x00000000 0x0000000f>,
> + <0x10019 0x00000000 0x00000004>,
> + <0x10021 0x00000000 0x00000003>;
> + riscv,raw-event-to-mhpmcounters =
> + <0x00000000 0x00000001 0xffffffff 0xffffffff
0x00000008>,
> + <0x00000000 0x00000002 0xffffffff 0xffffffff
0x00000010>,
> + <0x00000000 0x00000003 0xffffffff 0xffffffff
0x00000020>,
> + <0x00000000 0x00000004 0xffffffff 0xffffffff
0x00000040>,
> + <0x00000000 0x00000005 0xffffffff 0xffffffff
0x00000080>,
> + <0x00000000 0x00000006 0xffffffff 0xffffffff
0x00000100>,
> + <0x00000000 0x00000007 0xffffffff 0xffffffff
0x00000200>,
> + <0x00000000 0x0000000b 0xffffffff 0xffffffff
0x00002000>,
> + <0x00000000 0x0000000c 0xffffffff 0xffffffff
0x00004000>,
> + <0x00000000 0x0000000d 0xffffffff 0xffffffff
0x00008000>,
> + <0x00000000 0x0000000e 0xffffffff 0xffffffff
0x00010000>,
> + <0x00000000 0x0000000f 0xffffffff 0xffffffff
0x00020000>;
> + };
> };
> --
> 2.42.0
WARNING: multiple messages have this Message-ID (diff)
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Samuel Holland <samuel@sholland.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Inochi Amaoto <inochiama@outlook.com>,
Heiko Stuebner <heiko@sntech.de>, Wei Fu <wefu@redhat.com>,
Pei Chen <cp0613@linux.alibaba.com>,
Wenhan Chen <chenwenhan.cwh@alibaba-inc.com>,
Guo Ren <guoren@kernel.org>,
Inochi Amaoto <inochiama@outlook.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] riscv: dts: allwinner: d1: Add PMU event node
Date: Tue, 05 Sep 2023 22:31:19 +0200 [thread overview]
Message-ID: <3760158.kQq0lBPeGt@archlinux> (raw)
In-Reply-To: <IA1PR20MB49534918FCA69399CE2E0C53BBE0A@IA1PR20MB4953.namprd20.prod.outlook.com>
On Monday, August 28, 2023 6:30:22 AM CEST Inochi Amaoto wrote:
> D1 has several pmu events supported by opensbi.
> These events can be used by perf for profiling.
>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
> Link: https://dl.linux-sunxi.org/D1/Xuantie_C906_R1S0_User_Manual.pdf
> Link:
> https://github.com/T-head-Semi/openc906/blob/main/C906_RTL_FACTORY/gen_rtl/
> pmu/rtl/aq_hpcp_top.v#L657
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
What's the status of dependencies? Are they merged?
Best regards,
Jernej
> ---
> changed from v3:
> 1. remove wrong event mapping of 0x0000a
> 2. add reference url of c906 events implementation (D1 only support events
> described in R1S0 user manual, but event mapping is the same)
>
> changed from v2:
> 1. move pmu node from /soc to / to avoid warnings when checking.
>
> The meaning of T-HEAD events can be found in this pending patch:
> https://lore.kernel.org/linux-perf-users/IA1PR20MB4953DD82D0116EC291C21777BB
> E2A@IA1PR20MB4953.namprd20.prod.outlook.com
>
> The patch above also provides a example that shows how to setup
> environment and use perf with T-HEAD events.
> ---
> arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi index
> 8275630af977..53a984d78e3f 100644
> --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi
> @@ -73,4 +73,43 @@ plic: interrupt-controller@10000000 {
> #interrupt-cells = <2>;
> };
> };
> +
> + pmu {
> + compatible = "riscv,pmu";
> + riscv,event-to-mhpmcounters =
> + <0x00003 0x00003 0x00000008>,
> + <0x00004 0x00004 0x00000010>,
> + <0x00005 0x00005 0x00000200>,
> + <0x00006 0x00006 0x00000100>,
> + <0x10000 0x10000 0x00004000>,
> + <0x10001 0x10001 0x00008000>,
> + <0x10002 0x10002 0x00010000>,
> + <0x10003 0x10003 0x00020000>,
> + <0x10019 0x10019 0x00000040>,
> + <0x10021 0x10021 0x00000020>;
> + riscv,event-to-mhpmevent =
> + <0x00003 0x00000000 0x00000001>,
> + <0x00004 0x00000000 0x00000002>,
> + <0x00005 0x00000000 0x00000007>,
> + <0x00006 0x00000000 0x00000006>,
> + <0x10000 0x00000000 0x0000000c>,
> + <0x10001 0x00000000 0x0000000d>,
> + <0x10002 0x00000000 0x0000000e>,
> + <0x10003 0x00000000 0x0000000f>,
> + <0x10019 0x00000000 0x00000004>,
> + <0x10021 0x00000000 0x00000003>;
> + riscv,raw-event-to-mhpmcounters =
> + <0x00000000 0x00000001 0xffffffff 0xffffffff
0x00000008>,
> + <0x00000000 0x00000002 0xffffffff 0xffffffff
0x00000010>,
> + <0x00000000 0x00000003 0xffffffff 0xffffffff
0x00000020>,
> + <0x00000000 0x00000004 0xffffffff 0xffffffff
0x00000040>,
> + <0x00000000 0x00000005 0xffffffff 0xffffffff
0x00000080>,
> + <0x00000000 0x00000006 0xffffffff 0xffffffff
0x00000100>,
> + <0x00000000 0x00000007 0xffffffff 0xffffffff
0x00000200>,
> + <0x00000000 0x0000000b 0xffffffff 0xffffffff
0x00002000>,
> + <0x00000000 0x0000000c 0xffffffff 0xffffffff
0x00004000>,
> + <0x00000000 0x0000000d 0xffffffff 0xffffffff
0x00008000>,
> + <0x00000000 0x0000000e 0xffffffff 0xffffffff
0x00010000>,
> + <0x00000000 0x0000000f 0xffffffff 0xffffffff
0x00020000>;
> + };
> };
> --
> 2.42.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-05 20:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 4:30 [PATCH v4] riscv: dts: allwinner: d1: Add PMU event node Inochi Amaoto
2023-08-28 4:30 ` Inochi Amaoto
2023-08-28 4:30 ` Inochi Amaoto
2023-08-28 6:33 ` Conor Dooley
2023-08-28 6:33 ` Conor Dooley
2023-08-28 6:33 ` Conor Dooley
2023-08-28 6:41 ` [PATCH] " Inochi Amaoto
2023-08-28 6:41 ` Inochi Amaoto
2023-08-28 6:41 ` Inochi Amaoto
2023-08-28 6:50 ` Krzysztof Kozlowski
2023-08-28 6:50 ` Krzysztof Kozlowski
2023-08-28 6:50 ` Krzysztof Kozlowski
2023-08-28 6:59 ` [PATCH v4] " Inochi Amaoto
2023-08-28 6:59 ` Inochi Amaoto
2023-08-28 6:59 ` Inochi Amaoto
2023-09-05 20:31 ` Jernej Škrabec [this message]
2023-09-05 20:31 ` Jernej Škrabec
2023-09-05 20:31 ` Jernej Škrabec
2023-09-06 0:50 ` Guo Ren
2023-09-06 0:50 ` Guo Ren
2023-09-06 0:50 ` Guo Ren
2023-09-24 20:09 ` Jernej Škrabec
2023-09-24 20:09 ` Jernej Škrabec
2023-09-24 20:09 ` Jernej Škrabec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3760158.kQq0lBPeGt@archlinux \
--to=jernej.skrabec@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=chenwenhan.cwh@alibaba-inc.com \
--cc=conor+dt@kernel.org \
--cc=cp0613@linux.alibaba.com \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=heiko@sntech.de \
--cc=inochiama@outlook.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=wefu@redhat.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.