[PATCH v2] of/irq: Ignore interrupt parent for nodes without interrupts
Geert Uytterhoeven
geert at linux-m68k.org
Wed Dec 3 01:57:58 PST 2025
Hi Ionana,
On Wed, 3 Dec 2025 at 10:48, Ioana Ciornei <ioana.ciornei at nxp.com> wrote:
> On Tue, Dec 02, 2025 at 03:19:17PM -0600, Rob Herring wrote:
> > On Tue, Dec 2, 2025 at 10:36 AM Ioana Ciornei <ioana.ciornei at nxp.com> wrote:
> > > On Mon, Dec 01, 2025 at 06:09:19AM -0600, Rob Herring wrote:
> > > > On Fri, Nov 28, 2025 at 10:43 AM Ioana Ciornei <ioana.ciornei at nxp.com> wrote:
> > > > > On Fri, Nov 14, 2025 at 11:47:54AM +0100, Geert Uytterhoeven wrote:
> > > > > > 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 <geert+renesas at glider.be>
> > > > > This change irq-ls-extirq and commit 6ba51b7b34ca ("of/irq: Handle
> > > > > explicit interrupt parent") does not help with the issue.
> > > I just tried converting ls-extirq to a proper platform driver and it's
> > > pretty straightforward. The problem is getting that driver to probe on
> > > the ls-extirq dt node since of_platform_populate() is not called on its
> > > parent node.
> > >
> > > I would avoid changing the DT and adding a "simple-bus" compatible to
> > > the parent nodes. The other option is to add another simple driver which
> > > just calls of_platform_populate() for all compatible strings defined in
> > > fsl,layerscape-scfg.yaml.
> >
> > The simplest solution might be adding 'syscon' to the default match
> > list for of_platform_populate(). That's kind of a big hammer though
> > and could break something. Not sure, but I'm willing to stick that in
> > linux-next and see.
> >
> > Another option is hijack the simple-pm-bus driver which already does
> > just what you said.
>
> I would prefer the second option since that doesn't impact other
> platforms.
>
> Geert, since you are the module author, are you ok with the following
> diff?
>
> --- a/drivers/bus/simple-pm-bus.c
> +++ b/drivers/bus/simple-pm-bus.c
> @@ -142,6 +142,12 @@ static const struct of_device_id simple_pm_bus_of_match[] = {
> { .compatible = "simple-mfd", .data = ONLY_BUS },
> { .compatible = "isa", .data = ONLY_BUS },
> { .compatible = "arm,amba-bus", .data = ONLY_BUS },
> + { .compatible = "fsl,ls1021a-scfg", },
> + { .compatible = "fsl,ls1043a-scfg", },
> + { .compatible = "fsl,ls1046a-scfg", },
> + { .compatible = "fsl,ls1088a-isc", },
> + { .compatible = "fsl,ls2080a-isc", },
> + { .compatible = "fsl,lx2160a-isc", },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);
Fine for me.
Alternatively, these could be added to the match_table[] in
drivers/of/platform.c:of_platform_default_populate()?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
More information about the linux-riscv
mailing list