From nobody Wed Jul 1 19:44:39 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78A3AC43219 for ; Thu, 16 Dec 2021 13:41:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237651AbhLPNlc (ORCPT ); Thu, 16 Dec 2021 08:41:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237634AbhLPNla (ORCPT ); Thu, 16 Dec 2021 08:41:30 -0500 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34596C06173F for ; Thu, 16 Dec 2021 05:41:29 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:d13f:527c:5504:a743]) by baptiste.telenet-ops.be with bizsmtp id X1hT26006250X30011hTeg; Thu, 16 Dec 2021 14:41:27 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mxr0g-005QFd-Jk; Thu, 16 Dec 2021 14:41:26 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mxr0g-009y1T-4P; Thu, 16 Dec 2021 14:41:26 +0100 From: Geert Uytterhoeven To: Thomas Gleixner , Marc Zyngier , Rob Herring , Palmer Dabbelt , Paul Walmsley , Sagar Kadam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts Date: Thu, 16 Dec 2021 14:41:21 +0100 Message-Id: <41942eec41ccdf9831648c600d149af5e5f652a2.1639661878.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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". As the architectural maximum is 15872 interrupts, using that as the limit would be unpractical. Hence limit it to 9 interrupts (one interrupt for a system management core, and two interrupts per core for other cores). This should be sufficient for now, and the limit can always be increased when the need arises. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring --- 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(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,= plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/si= five,plic-1.0.0.yaml index 28b6b17fe4b26778..0c6687511457413e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml @@ -62,6 +62,7 @@ properties: =20 interrupts-extended: minItems: 1 + maxItems: 9 description: Specifies which contexts are connected to the PLIC, with "-1" specif= ying that a context is not present. Each node pointed to should be a --=20 2.25.1 From nobody Wed Jul 1 19:44:39 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AF29C433F5 for ; Thu, 16 Dec 2021 13:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237662AbhLPNld (ORCPT ); Thu, 16 Dec 2021 08:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237633AbhLPNla (ORCPT ); Thu, 16 Dec 2021 08:41:30 -0500 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40007C061746 for ; Thu, 16 Dec 2021 05:41:29 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:d13f:527c:5504:a743]) by xavier.telenet-ops.be with bizsmtp id X1hT2600J250X30011hT25; Thu, 16 Dec 2021 14:41:27 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mxr0g-005QFe-Vs; Thu, 16 Dec 2021 14:41:26 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mxr0g-009y1c-67; Thu, 16 Dec 2021 14:41:26 +0100 From: Geert Uytterhoeven To: Thomas Gleixner , Marc Zyngier , Rob Herring , Palmer Dabbelt , Paul Walmsley , Sagar Kadam Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples Date: Thu, 16 Dec 2021 14:41:22 +0100 Message-Id: <2f1894def1ab4fb4151357a7a0b2f66760165d72.1639661878.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven --- v2: - Split in two patches. --- .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,= plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/si= five,plic-1.0.0.yaml index 0c6687511457413e..52a3bc31a2c19c5d 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.= 0.0.yaml @@ -91,12 +91,11 @@ examples: #interrupt-cells =3D <1>; compatible =3D "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; interrupt-controller; - interrupts-extended =3D < - &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 =3D <&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 =3D <0xc000000 0x4000000>; riscv,ndev =3D <10>; }; --=20 2.25.1