From nobody Wed Dec 17 17:39:13 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F3541D88D0; Fri, 3 Oct 2025 10:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759486095; cv=none; b=s1HNsUuowFSmWNDM+6Qut/8YW0Z3wH0YVvAYF4j1M4OinLiqUJEWeHvmbtMI7SmOqVEhirFGO8jhYR07JZToMdt6Vg/cuJbEJjgrg5V41DAxXyTPsMk16k6QIPOx8Bl74n51C/yboUN8/39e4KG6NpMMcFUf3AorogSUEmgUH5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759486095; c=relaxed/simple; bh=7rgKALxlyD7zLq5Sy/eX+cMxrClqlIZzpl9cnsqV7Gs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M9BztBPn47Lr3prpjlEfQVUmzHg4roq/Mvbk4tzpZbT1Dk0Uem7VE6ickxtqX2bNTy876EsIsyIUa23/4GVMey4PwrwQg3a0JRjGHuFZbgkwpZi90g+dv4B7cJlhNajWoT0yFAy8AqPmVJ3ly4cbFDBiluzQIq1O/Rnz/jJvOp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E607FC4CEF9; Fri, 3 Oct 2025 10:08:11 +0000 (UTC) From: Geert Uytterhoeven To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Samuel Holland , Marc Zyngier , Saravana Kannan , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC 1/2] of/irq: Ignore interrupt parent for nodes without interrupts Date: Fri, 3 Oct 2025 12:07:48 +0200 Message-ID: <98e13934d06116d5c116bd2b2187842ec3a8c11a.1759485668.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Devicetree Specification states: The root of the interrupt tree is determined when traversal of the interrupt tree reaches an interrupt controller node without an interrupts property and thus no explicit interrupt parent. However, of_irq_init() gratuitously assumes that a node without interrupts has an actual interrupt parent if it finds an interrupt-parent property higher up in the device tree. Hence when such a property is present (e.g. in the root node), the root interrupt controller may not be detected as such, causing a panic: OF: of_irq_init: children remain, but no parents Kernel panic - not syncing: No interrupt controller found. Commit e91033621d56e055 ("of/irq: Use interrupts-extended to find parent") already fixed a first part, by checking for the presence of an interrupts-extended property. Fix the second part by only calling of_irq_find_parent() when an interrupts property is present. Signed-off-by: Geert Uytterhoeven --- drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/irq.c b/drivers/of/irq.c index c29f0bef7798ec02..f155054e297c989a 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -663,7 +663,7 @@ void __init of_irq_init(const struct of_device_id *matc= hes) * are the same distance away from the root irq controller. */ desc->interrupt_parent =3D of_parse_phandle(np, "interrupts-extended", 0= ); - if (!desc->interrupt_parent) + if (!desc->interrupt_parent && of_property_present(np, "interrupts")) desc->interrupt_parent =3D of_irq_find_parent(np); if (desc->interrupt_parent =3D=3D np) { of_node_put(desc->interrupt_parent); --=20 2.43.0 From nobody Wed Dec 17 17:39:13 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D36872E8B9A; Fri, 3 Oct 2025 10:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759486099; cv=none; b=qbjJ6KcRqBjz8HJvk0/prC2+/IVY/xOG0PQ/mr7yyFyx1eruBXTIK+9TgvEIlpFedqsB1PIuqr/ZBU0719q8vbKmb/VxlXIxbV99KkkiL+7P7obmQcp+Q7RdF+WKQN4PYXwH6hp634qU+qROPB4sXu7CDEbGXEzxfIysxXocy/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759486099; c=relaxed/simple; bh=kIDAaVBm4hCKZdHyLuxZHTfdOtMs0twtoGrJpSIf6DY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hhfHSIOxt/4VazeydcP2XPXPj5gYodWCixgJZHq9m9znxpoivuqwAZmqLhVhx5A25usB+acr2TlExrXyS9QH4o6CIVzgF2SQQM0Id4AK37gSX14domDMJK1GDCixxUBWyXH+FBlPP/mDOR3WwfizQwQxv84LRAkde/7LkUE1XIQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F85FC4CEF5; Fri, 3 Oct 2025 10:08:15 +0000 (UTC) From: Geert Uytterhoeven To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Samuel Holland , Marc Zyngier , Saravana Kannan , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC 2/2] riscv: dts: renesas: r9a07g043f: Move interrupt-parent to top node Date: Fri, 3 Oct 2025 12:07:49 +0200 Message-ID: <8e7c7881800827467f1687432751addb822bb85b.1759485668.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move the "interrupt-parent =3D <&plic>" property from the soc node to the top node, for consistency with arch/arm64/boot/dts/renesas/r9a07g043u.dtsi. Signed-off-by: Geert Uytterhoeven --- arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/= dts/renesas/r9a07g043f.dtsi index a8bcb26f42700644..571de3cafa8214e4 100644 --- a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi @@ -12,6 +12,8 @@ #include =20 / { + interrupt-parent =3D <&plic>; + cpus { #address-cells =3D <1>; #size-cells =3D <0>; @@ -52,7 +54,6 @@ &pinctrl { =20 &soc { dma-noncoherent; - interrupt-parent =3D <&plic>; =20 irqc: interrupt-controller@110a0000 { compatible =3D "renesas,r9a07g043f-irqc"; --=20 2.43.0