Skip to contentSkip to conversation

dt-bindings: interrupt-controller: sifive, plic: Miscellaneous improvements

PATCH In review Geert Uytterhoeven 4 participants 8 messages Jan 28, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v4 cover dt-bindings: interrupt-controller: sifive, plic: Miscellaneous improvements

Hi all,

This patch series contains two improvements for the SiFive PLIC DT bindings.

Changes compared to v3[1]:
- Use architectural maximum instead of practical maximum of 9,

Changes compared to v2[2]:
- Add Acked-by, Reviewed-by.

Changes compared to v1[3]:
- Split in two patches,
- Improve patch description and document limit rationale.

Thanks!

[1] https://lore.kernel.org/r/[email protected]/
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]

Geert Uytterhoeven (2):
dt-bindings: interrupt-controller: sifive,plic: Fix number of
interrupts
dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples

 .../interrupt-controller/sifive,plic-1.0.0.yaml      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 12 lines
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
#6 lore raw

PATCH v4 2/2 dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples

To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets.

---
v4:
- No changes,

v3:
- Add Reviewed-by,

v2:
- Split in two patches.

---
 .../interrupt-controller/sifive,plic-1.0.0.yaml       | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +5 -6
index 57c06126c99502fa..0dfa6b26e09910a8 100644
@@ -91,12 +91,11 @@ examples:
       #interrupt-cells = <1>;
       compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
       interrupt-controller;
-      interrupts-extended = <
-        &cpu0_intc 11
-        &cpu1_intc 11 &cpu1_intc 9
-        &cpu2_intc 11 &cpu2_intc 9
-        &cpu3_intc 11 &cpu3_intc 9
-        &cpu4_intc 11 &cpu4_intc 9>;
+      interrupts-extended = <&cpu0_intc 11>,
+                            <&cpu1_intc 11>, <&cpu1_intc 9>,
+                            <&cpu2_intc 11>, <&cpu2_intc 9>,
+                            <&cpu3_intc 11>, <&cpu3_intc 9>,
+                            <&cpu4_intc 11>, <&cpu4_intc 9>;
       reg = <0xc000000 0x4000000>;
       riscv,ndev = <10>;
     };
Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 1/2 dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts

In reply to Geert Uytterhoeven

The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check".

Fix this by adding the missing "maxItems", using the architectural maximum of 15872 interrupts.

---
v4:
- Use architectural maximum instead of practical maximum of 9,

v3:
- Add Acked-by,

v2:
- Split in two patches,
- Improve patch description and document limit rationale.

---
 .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml         | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -0
index 28b6b17fe4b26778..57c06126c99502fa 100644
@@ -62,6 +62,7 @@ properties:
 
   interrupts-extended:
     minItems: 1
+    maxItems: 15872
     description:
       Specifies which contexts are connected to the PLIC, with "-1" specifying
       that a context is not present. Each node pointed to should be a
Signature · 1 line
2.25.1
Reviewed-by on v4 1/2
#2 lore raw

Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts

Quoted 10 lines · Geert Uytterhoeven

The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check".

Fix this by adding the missing "maxItems", using the architectural maximum of 15872 interrupts.

Looks good to me.

Regards,
Anup

Quoted 34 lines

---
v4:
- Use architectural maximum instead of practical maximum of 9,

v3:
- Add Acked-by,

v2:
- Split in two patches,
- Improve patch description and document limit rationale.

---
 .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml         | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -1
index 28b6b17fe4b26778..57c06126c99502fa 100644
@@ -62,6 +62,7 @@ properties:
 
   interrupts-extended:
     minItems: 1
+    maxItems: 15872
     description:
       Specifies which contexts are connected to the PLIC, with "-1" specifying
       that a context is not present. Each node pointed to should be a
--

2.25.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

Reviewed-by on v4 2/2
#7 lore raw

Re: [PATCH v4 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples

In reply to Geert Uytterhoeven
Quoted 7 lines · Geert Uytterhoeven

To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets.

Looks good to me.

Regards,
Anup

Quoted 38 lines

---
v4:
- No changes,

v3:
- Add Reviewed-by,

v2:
- Split in two patches.

---
 .../interrupt-controller/sifive,plic-1.0.0.yaml       | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +5 -7
index 57c06126c99502fa..0dfa6b26e09910a8 100644
@@ -91,12 +91,11 @@ examples:
       #interrupt-cells = <1>;
       compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
       interrupt-controller;
-      interrupts-extended = <
-        &cpu0_intc 11
-        &cpu1_intc 11 &cpu1_intc 9
-        &cpu2_intc 11 &cpu2_intc 9
-        &cpu3_intc 11 &cpu3_intc 9
-        &cpu4_intc 11 &cpu4_intc 9>;
+      interrupts-extended = <&cpu0_intc 11>,
+                            <&cpu1_intc 11>, <&cpu1_intc 9>,
+                            <&cpu2_intc 11>, <&cpu2_intc 9>,
+                            <&cpu3_intc 11>, <&cpu3_intc 9>,
+                            <&cpu4_intc 11>, <&cpu4_intc 9>;
       reg = <0xc000000 0x4000000>;
       riscv,ndev = <10>;
     };
--

2.25.1

Acked-by on v4 1/2
#3 lore raw

Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts

In reply to Geert Uytterhoeven
Quoted 36 lines

The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check".

Fix this by adding the missing "maxItems", using the architectural maximum of 15872 interrupts.

---
v4:
- Use architectural maximum instead of practical maximum of 9,

v3:
- Add Acked-by,

v2:
- Split in two patches,
- Improve patch description and document limit rationale.

---
 .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml         | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -1
index 28b6b17fe4b26778..57c06126c99502fa 100644
@@ -62,6 +62,7 @@ properties:
 
   interrupts-extended:
     minItems: 1
+    maxItems: 15872
     description:
       Specifies which contexts are connected to the PLIC, with "-1" specifying
       that a context is not present. Each node pointed to should be a
--
Quoted 1 line

2.25.1

As with the clint - clears errors on the icicle dt, so fwiw:

#4 lore raw

Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts

Quoted 3 lines · Conor Dooley

[1 PGP/MIME version identification <application/pgp-encrypted (7bit)>] [2 OpenPGP encrypted message <application/octet-stream (7bit)>]

Please refrain from posting encrypted messages to the mailing lists.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
#5 lore raw

Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts

Quoted 9 lines · Marc Zyngier
Quoted 3 lines · Conor Dooley

[1 PGP/MIME version identification <application/pgp-encrypted (7bit)>] [2 OpenPGP encrypted message <application/octet-stream (7bit)>]

Please refrain from posting encrypted messages to the mailing lists.

	M.

Apologies - not my usual mail client. It appears to have decided that you (and Rob) should get it encrypted even though I had that disabled. Actually doing so also would appear to be non trivial. I am hoping but not expecting to have fixed it.
The mail to the list itself looks to be fine however.

Quoted 3 lines

--
Without deviation from the norm, progress is not possible.