devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Samuel Holland <samuel@sholland.org>,
	Marc Zyngier <maz@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH/RFC 0/2] of/irq: Fix root interrupt controller handling
Date: Fri,  3 Oct 2025 12:07:47 +0200	[thread overview]
Message-ID: <cover.1759485668.git.geert+renesas@glider.be> (raw)

	Hi all,

On ARM, the main interrupt controller is typically the GIC, and one can
safely put "interrupt-parent = <&gic>;" in the root node.  The GIC node
has an interrupts property, but it points to itself, causing
of_irq_init() to treat it as the root interrupt controller.

On RISC-V, the main interrupt controller is typically the PLIC.
However, one can not put "interrupt-parent = <&plic>;" in the root node,
as that would cause a kernel panic ("No interrupt controller found").
The main difference with ARM is that the PLIC is not the root interrupt
controller: its interrupt parent is the RISC-V CPU or Hart-Level
Interrupt Controller (HLIC).  The latter is the root interrupt
controller, and despite having no interrupts property, it is currently
not considered the root interrupt controller when an interrupt-parent
property is present in the root node.

This series fixes the issue in of_irq_init(), and moves the
"interrupt-parent = <&plic>;" for the RZ/Five (R9A07G043F) SoC from the
soc node to the top node, like was done recently for the very similar
RZ/G2UL (R9A07G043U) SoC[1].

Thanks for your comments!

[1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git/commit/?h=renesas-dts-for-v6.19&id=0070434f4a910179a23cd7ab812c33811f00b253)

Geert Uytterhoeven (2):
  of/irq: Ignore interrupt parent for nodes without interrupts
  riscv: dts: renesas: r9a07g043f: Move interrupt-parent to top node

 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 3 ++-
 drivers/of/irq.c                            | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.43.0

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

             reply	other threads:[~2025-10-03 10:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 10:07 Geert Uytterhoeven [this message]
2025-10-03 10:07 ` [PATCH/RFC 1/2] of/irq: Ignore interrupt parent for nodes without interrupts Geert Uytterhoeven
2025-10-03 13:32   ` Rob Herring
2025-10-06  7:35     ` Geert Uytterhoeven
2025-10-03 10:07 ` [PATCH/RFC 2/2] riscv: dts: renesas: r9a07g043f: Move interrupt-parent to top node Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1759485668.git.geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=magnus.damm@gmail.com \
    --cc=maz@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).