public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [PATCH v5 12/16] riscv: dts: sophgo: Add T-Head PMU extension for cv1800b
       [not found] ` <20231213070301.1684751-13-peterlin@andestech.com>
@ 2023-12-13 15:23   ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:23 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 1160 bytes --]

On Wed, Dec 13, 2023 at 03:02:57PM +0800, Yu Chien Peter Lin wrote:
> xtheadpmu stands for T-Head Performance Monitor Unit extension.
> Based on the added T-Head PMU ISA string, the SBI PMU driver
> will make use of the non-standard irq source.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
> Changes v4 -> v5:
>   - New patch
> ---
>  arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> index aec6401a467b..8c0143f0a01b 100644
> --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> @@ -29,7 +29,7 @@ cpu0: cpu@0 {
>  			riscv,isa = "rv64imafdc";
>  			riscv,isa-base = "rv64i";
>  			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> -					       "zifencei", "zihpm";
> +					       "zifencei", "zihpm", "xtheadpmu";
>  
>  			cpu0_intc: interrupt-controller {
>  				compatible = "riscv,cpu-intc";
> -- 
> 2.34.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 14/16] riscv: dts: thead: Add T-Head PMU extension for th1520
       [not found] ` <20231213070301.1684751-15-peterlin@andestech.com>
@ 2023-12-13 15:23   ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:23 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 2214 bytes --]

On Wed, Dec 13, 2023 at 03:02:59PM +0800, Yu Chien Peter Lin wrote:
> xtheadpmu stands for T-Head Performance Monitor Unit extension.
> Based on the added T-Head PMU ISA string, the SBI PMU driver
> will make use of the non-standard irq source.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
> Changes v4 -> v5:
>   - New patch
> ---
>  arch/riscv/boot/dts/thead/th1520.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
> index ba4d2c673ac8..2dad2b22824a 100644
> --- a/arch/riscv/boot/dts/thead/th1520.dtsi
> +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
> @@ -22,7 +22,7 @@ c910_0: cpu@0 {
>  			riscv,isa = "rv64imafdc";
>  			riscv,isa-base = "rv64i";
>  			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> -					       "zifencei", "zihpm";
> +					       "zifencei", "zihpm", "xtheadpmu";
>  			reg = <0>;
>  			i-cache-block-size = <64>;
>  			i-cache-size = <65536>;
> @@ -46,7 +46,7 @@ c910_1: cpu@1 {
>  			riscv,isa = "rv64imafdc";
>  			riscv,isa-base = "rv64i";
>  			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> -					       "zifencei", "zihpm";
> +					       "zifencei", "zihpm", "xtheadpmu";
>  			reg = <1>;
>  			i-cache-block-size = <64>;
>  			i-cache-size = <65536>;
> @@ -70,7 +70,7 @@ c910_2: cpu@2 {
>  			riscv,isa = "rv64imafdc";
>  			riscv,isa-base = "rv64i";
>  			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> -					       "zifencei", "zihpm";
> +					       "zifencei", "zihpm", "xtheadpmu";
>  			reg = <2>;
>  			i-cache-block-size = <64>;
>  			i-cache-size = <65536>;
> @@ -94,7 +94,7 @@ c910_3: cpu@3 {
>  			riscv,isa = "rv64imafdc";
>  			riscv,isa-base = "rv64i";
>  			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> -					       "zifencei", "zihpm";
> +					       "zifencei", "zihpm", "xtheadpmu";
>  			reg = <3>;
>  			i-cache-block-size = <64>;
>  			i-cache-size = <65536>;
> -- 
> 2.34.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 13/16] riscv: dts: sophgo: Add T-Head PMU extension for sg2042
       [not found] ` <20231213070301.1684751-14-peterlin@andestech.com>
@ 2023-12-13 15:24   ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:24 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 391 bytes --]

On Wed, Dec 13, 2023 at 03:02:58PM +0800, Yu Chien Peter Lin wrote:
> xtheadpmu stands for T-Head Performance Monitor Unit extension.
> Based on the added T-Head PMU ISA string, the SBI PMU driver
> will make use of the non-standard irq source.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 15/16] riscv: dts: renesas: Add Andes PMU extension for r9a07g043f
       [not found] ` <20231213070301.1684751-16-peterlin@andestech.com>
@ 2023-12-13 15:24   ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:24 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 590 bytes --]

On Wed, Dec 13, 2023 at 03:03:00PM +0800, Yu Chien Peter Lin wrote:
> xandespmu stands for Andes Performance Monitor Unit extension.
> Based on the added Andes PMU ISA string, the SBI PMU driver
> will make use of the non-standard irq source.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 09/16] dt-bindings: riscv: Add T-Head PMU extension description
       [not found] ` <20231213070301.1684751-10-peterlin@andestech.com>
@ 2023-12-13 15:26   ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:26 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 1722 bytes --]

On Wed, Dec 13, 2023 at 03:02:54PM +0800, Yu Chien Peter Lin wrote:
> Document the ISA string for T-Head performance monitor extension
> which provides counter overflow interrupt mechanism.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> Reviewed-by: Guo Ren <guoren@kernel.org>
> Reviewed-by: Inochi Amaoto <inochiama@outlook.com>
> ---
> Changes v2 -> v3:
>   - New patch
> Changes v3 -> v4:
>   - No change
> Changes v4 -> v5:
>   - Include Guo's Reviewed-by
>   - Include Inochi's Reviewed-by
>   - Update to C910 documentation with its commit hash
> ---
>  Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
> index c91ab0e46648..b5cb8ac7ac80 100644
> --- a/Documentation/devicetree/bindings/riscv/extensions.yaml
> +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
> @@ -258,5 +258,11 @@ properties:
>              in commit 2e5236 ("Ztso is now ratified.") of the
>              riscv-isa-manual.
>  
> +        - const: xtheadpmu
> +          description:
> +            The T-Head performance monitor extension for counter overflow, as ratified

I'm not sure that "ratified" here is the right word, probably
"documented" is better, but I don't think that is worth a resend.

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> +            in commit 4c4981 ("Initial commit") of Xuantie C910 user manual.
> +            https://github.com/T-head-Semi/openc910/tree/main/doc
> +
>  additionalProperties: true
>  ...
> -- 
> 2.34.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 07/16] RISC-V: Move T-Head PMU to CPU feature alternative framework
       [not found] ` <20231213070301.1684751-8-peterlin@andestech.com>
@ 2023-12-13 15:27   ` Conor Dooley
  2023-12-13 15:32     ` Conor Dooley
  0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:27 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]

On Wed, Dec 13, 2023 at 03:02:52PM +0800, Yu Chien Peter Lin wrote:
> The custom PMU extension aims to support perf event sampling prior
> to the ratification of Sscofpmf. Instead of diverting the bits and
> register reserved for future standard, a set of custom registers is
> added.  Hence, we may consider it as a CPU feature rather than an
> erratum.
> 
> T-Head cores need to append "xtheadpmu" to the riscv,isa-extensions
> for each cpu node in device tree, and enable CONFIG_THEAD_CUSTOM_PMU
> for proper functioning as of this commit.
> 
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> Reviewed-by: Guo Ren <guoren@kernel.org>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH v5 07/16] RISC-V: Move T-Head PMU to CPU feature alternative framework
  2023-12-13 15:27   ` [PATCH v5 07/16] RISC-V: Move T-Head PMU to CPU feature alternative framework Conor Dooley
@ 2023-12-13 15:32     ` Conor Dooley
  0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2023-12-13 15:32 UTC (permalink / raw)
  To: Yu Chien Peter Lin
  Cc: acme, adrian.hunter, ajones, alexander.shishkin, andre.przywara,
	anup, aou, atishp, conor+dt, conor.dooley, devicetree, dminus,
	evan, geert+renesas, guoren, heiko, irogers, jernej.skrabec,
	jolsa, jszhang, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-kernel, linux-perf-users, linux-renesas-soc, linux-riscv,
	linux-sunxi, locus84, magnus.damm, mark.rutland, mingo, n.shubin,
	namhyung, palmer, paul.walmsley, peterz, prabhakar.mahadev-lad.rj,
	rdunlap, robh+dt, samuel, sunilvl, tglx, tim609, uwu, wens, will,
	ycliang, inochiama


[-- Attachment #1.1: Type: text/plain, Size: 1296 bytes --]

On Wed, Dec 13, 2023 at 03:27:25PM +0000, Conor Dooley wrote:
> On Wed, Dec 13, 2023 at 03:02:52PM +0800, Yu Chien Peter Lin wrote:
> > The custom PMU extension aims to support perf event sampling prior
> > to the ratification of Sscofpmf. Instead of diverting the bits and
> > register reserved for future standard, a set of custom registers is
> > added.  Hence, we may consider it as a CPU feature rather than an
> > erratum.
> > 
> > T-Head cores need to append "xtheadpmu" to the riscv,isa-extensions
> > for each cpu node in device tree, and enable CONFIG_THEAD_CUSTOM_PMU
> > for proper functioning as of this commit.
> > 
> > Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> > Reviewed-by: Guo Ren <guoren@kernel.org>
> 
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

I think it is also worth mentioning that the only SoC, to my knowledge,
that works with a mainline kernel, and supports the SBI PMU is the D1,
and only recently has the OpenSBI port for the SoC been fixed to
actually work correctly, and that has apparently not yet made it to
a release of OpenSBI, making the "damage" caused by requiring a DT
property for PMU support not all that bad since the firmware needs to be
changed anyway.

Thanks for your work on this,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2023-12-13 15:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231213070301.1684751-1-peterlin@andestech.com>
     [not found] ` <20231213070301.1684751-13-peterlin@andestech.com>
2023-12-13 15:23   ` [PATCH v5 12/16] riscv: dts: sophgo: Add T-Head PMU extension for cv1800b Conor Dooley
     [not found] ` <20231213070301.1684751-15-peterlin@andestech.com>
2023-12-13 15:23   ` [PATCH v5 14/16] riscv: dts: thead: Add T-Head PMU extension for th1520 Conor Dooley
     [not found] ` <20231213070301.1684751-14-peterlin@andestech.com>
2023-12-13 15:24   ` [PATCH v5 13/16] riscv: dts: sophgo: Add T-Head PMU extension for sg2042 Conor Dooley
     [not found] ` <20231213070301.1684751-16-peterlin@andestech.com>
2023-12-13 15:24   ` [PATCH v5 15/16] riscv: dts: renesas: Add Andes PMU extension for r9a07g043f Conor Dooley
     [not found] ` <20231213070301.1684751-10-peterlin@andestech.com>
2023-12-13 15:26   ` [PATCH v5 09/16] dt-bindings: riscv: Add T-Head PMU extension description Conor Dooley
     [not found] ` <20231213070301.1684751-8-peterlin@andestech.com>
2023-12-13 15:27   ` [PATCH v5 07/16] RISC-V: Move T-Head PMU to CPU feature alternative framework Conor Dooley
2023-12-13 15:32     ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox