From patchwork Thu Dec 16 13:41:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12681265 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76082C433EF for ; Thu, 16 Dec 2021 13:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J9bHixIwomCMTudemzdMcjPyIqsh/4mbZ949b+DhasU=; b=s1GqZEYj6/DjvM ShSOftEIcf6Bfwb4oj3uSmFgOj4tkfM5RChvzIr+hNC0phSFQEIddSeaRbfzX760KDOUKeWXzHfSl g1+d3M6BDQV+qD90P6UtwOvRVDgObxRP4L9pPZ8kMlUK2INTSqKGE/MHwrtoBU4+VOP72l6LhGUNl 5TsHsNLDNCiJ7zEoZDBUAK32BPHV6HRVYNi9EtUhjxof5JEx9zigfjMgERRiY/9eZUoBjZgyg6Za6 fgTWvCdDg43Y7h38TS8l9LxrC+6Eabyonqrb4Fce5yTh+w9LYwtbH5JK6bM+Jn7SUNH5e7maBozV8 3vcZqZ0y0mA0VtijXg6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxr8g-005wd9-EI; Thu, 16 Dec 2021 13:49:42 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxr0j-005swD-Nn for linux-riscv@lists.infradead.org; Thu, 16 Dec 2021 13:41:31 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_054129_968747_7D664AF5 X-CRM114-Status: GOOD ( 10.63 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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/sifive,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: interrupts-extended: minItems: 1 + maxItems: 9 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 From patchwork Thu Dec 16 13:41:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12681267 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F43AC433EF for ; Thu, 16 Dec 2021 13:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y5oq3JPWthdHWXGYwQ5Wntgc4GLz+eTRec1TAjWJJCA=; b=pAdWdr2cyP7gaj Puhy5U+/3727dkRq6ImBCsuWKbkGXy1YYjTcJ23CTSf97XzSUPvN2gQriqc1Kybqgb7C0H0Y92bBk nfhJcHIBByn5iRhyaklmHUUrqPNUmnD9aUIe6ONZaDUwtddGSJCzscjPoL0gK3Oh3nUJpSWbVFCJw 9e2Z9oIv2EXgfkJ0iuIGI9VVmrO46YzYHZU30kUqPw6Nt2N+QeTs2hTsG/YAduwdpF6gz2GIfJQ6N 8vyvur5rqlXDmzUP95XbRhl43ky/dDEKKpAaD3U76siqtJaQbRRWCBLJlcy0vdLBli5E3wL3UxF0F zbCJN/4pJelJV05a1G1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxr8q-005whp-Fl; Thu, 16 Dec 2021 13:49:52 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxr0j-005swF-OM for linux-riscv@lists.infradead.org; Thu, 16 Dec 2021 13:41:32 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_054130_014362_26AC551C X-CRM114-Status: UNSURE ( 8.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Rob Herring --- 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/sifive,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 = <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>; };