Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] dt-bindings: perf: riscv,pmu: Add interrupts-extended property
@ 2026-07-02  9:04 Eric Lin
  2026-10-08 10:22 ` Conor Dooley
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Lin @ 2026-07-02  9:04 UTC (permalink / raw)
  To: Will Deacon, Mark Rutland, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Atish Patra
  Cc: linux-arm-kernel, linux-perf-users, devicetree, linux-riscv,
	linux-kernel, Nick Hu, Eric Lin

The interrupts-extended property is used to specify the connection
between the PMU counter overflow interrupt and the corresponding CPU
local interrupt controller (riscv,cpu-intc).

This property also allows the software to associate a PMU node with a
specific CPU. To support future heterogeneous systems, where different
CPUs may support different PMU events, this property allows the driver
to identify the correct PMU capabilities for each hart.

Reviewed-by: Nick Hu <nick.hu@sifive.com>
Signed-off-by: Eric Lin <eric.lin@sifive.com>
---
 Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
index d01c677ad3c7..13aceb3d42b9 100644
--- a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
+++ b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
@@ -34,6 +34,13 @@ properties:
   compatible:
     const: riscv,pmu
 
+  interrupts-extended:
+    minItems: 1
+    maxItems: 4095
+    description:
+      Specifies the interrupt-parent and local interrupt index for each CPU's
+      PMU counter overflow. Each item points to a riscv,cpu-intc node.
+
   riscv,event-to-mhpmevent:
     $ref: /schemas/types.yaml#/definitions/uint32-matrix
     description:
@@ -101,6 +108,7 @@ examples:
   - |
     pmu {
         compatible = "riscv,pmu";
+        interrupts-extended = <&cpu0_intc 13>;
         riscv,event-to-mhpmevent = <0x0000B 0x0000 0x0001>;
         riscv,event-to-mhpmcounters = <0x00001 0x00001 0x00000001>,
                                       <0x00002 0x00002 0x00000004>,
@@ -127,6 +135,9 @@ examples:
      */
     pmu {
           compatible = "riscv,pmu";
+          interrupts-extended = <&cpu0_intc 13>,
+                                <&cpu1_intc 13>,<&cpu2_intc 13>,
+                                <&cpu3_intc 13>,<&cpu4_intc 13>;
           riscv,event-to-mhpmevent =
               /* SBI_PMU_HW_CACHE_REFERENCES -> Instruction or Data cache/ITIM busy */
               <0x00003 0x00000000 0x1801>,

---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260701-pmu-dt-property-ff12b35fe0fc

Best regards,
--  
Eric Lin <eric.lin@sifive.com>



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

* Re: [PATCH RFC] dt-bindings: perf: riscv,pmu: Add interrupts-extended property
  2026-07-02  9:04 [PATCH RFC] dt-bindings: perf: riscv,pmu: Add interrupts-extended property Eric Lin
@ 2026-10-08 10:22 ` Conor Dooley
  0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2026-10-08 10:22 UTC (permalink / raw)
  To: Eric Lin
  Cc: Will Deacon, Mark Rutland, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Atish Patra, linux-arm-kernel, linux-perf-users,
	devicetree, linux-riscv, linux-kernel, Nick Hu

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

On Thu, Jul 02, 2026 at 05:04:31PM +0800, Eric Lin wrote:
> The interrupts-extended property is used to specify the connection
> between the PMU counter overflow interrupt and the corresponding CPU
> local interrupt controller (riscv,cpu-intc).
> 
> This property also allows the software to associate a PMU node with a
> specific CPU. To support future heterogeneous systems, where different
> CPUs may support different PMU events, this property allows the driver
> to identify the correct PMU capabilities for each hart.
> 
> Reviewed-by: Nick Hu <nick.hu@sifive.com>
> Signed-off-by: Eric Lin <eric.lin@sifive.com>

This has been sitting for ages, I was kinda waiting to see if there'd be
some feedback from the relevant maintainers (riscv pmu). Was there a
series sent to opensbi or elsewhere to implement support for these
devices?

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/perf/riscv,pmu.yaml | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> index d01c677ad3c7..13aceb3d42b9 100644
> --- a/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> +++ b/Documentation/devicetree/bindings/perf/riscv,pmu.yaml
> @@ -34,6 +34,13 @@ properties:
>    compatible:
>      const: riscv,pmu
>  
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 4095
> +    description:
> +      Specifies the interrupt-parent and local interrupt index for each CPU's
> +      PMU counter overflow. Each item points to a riscv,cpu-intc node.
> +
>    riscv,event-to-mhpmevent:
>      $ref: /schemas/types.yaml#/definitions/uint32-matrix
>      description:
> @@ -101,6 +108,7 @@ examples:
>    - |
>      pmu {
>          compatible = "riscv,pmu";
> +        interrupts-extended = <&cpu0_intc 13>;
>          riscv,event-to-mhpmevent = <0x0000B 0x0000 0x0001>;
>          riscv,event-to-mhpmcounters = <0x00001 0x00001 0x00000001>,
>                                        <0x00002 0x00002 0x00000004>,
> @@ -127,6 +135,9 @@ examples:
>       */
>      pmu {
>            compatible = "riscv,pmu";
> +          interrupts-extended = <&cpu0_intc 13>,
> +                                <&cpu1_intc 13>,<&cpu2_intc 13>,
> +                                <&cpu3_intc 13>,<&cpu4_intc 13>;
>            riscv,event-to-mhpmevent =
>                /* SBI_PMU_HW_CACHE_REFERENCES -> Instruction or Data cache/ITIM busy */
>                <0x00003 0x00000000 0x1801>,
> 
> ---
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
> change-id: 20260701-pmu-dt-property-ff12b35fe0fc
> 
> Best regards,
> --  
> Eric Lin <eric.lin@sifive.com>
> 

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

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

end of thread, other threads:[~2026-10-08 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  9:04 [PATCH RFC] dt-bindings: perf: riscv,pmu: Add interrupts-extended property Eric Lin
2026-10-08 10:22 ` Conor Dooley

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