From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Marc Zyngier <maz@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Leo Li <leoyang.li@nxp.com>, Biwen Li <biwen.li@nxp.com>,
"Z.Q. Hou" <zhiqiang.hou@nxp.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [RFC PATCH devicetree 00/10] Do something about ls-extirq interrupt-map breakage
Date: Thu, 24 Mar 2022 17:34:06 +0000 [thread overview]
Message-ID: <20220324173405.nusk6247ouvek46y@skbuf> (raw)
In-Reply-To: <87lewz5kr5.wl-maz@kernel.org>
On Thu, Mar 24, 2022 at 05:21:50PM +0000, Marc Zyngier wrote:
> On Thu, 24 Mar 2022 17:10:42 +0000,
> Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> >
> > Hello Marc,
> >
> > On Tue, Dec 14, 2021 at 10:20:36AM +0000, Marc Zyngier wrote:
> > > On Tue, 14 Dec 2021 09:58:54 +0000,
> > > Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> > > >
> > > > Hi Marc (with a c),
> > > >
> > > > I wish the firmware for these SoCs was smart enough to be compatible
> > > > with the bindings that are in the kernel and provide a blob that the
> > > > kernel could actually use. Some work has been started there and this is
> > > > work in progress. True, I don't know what other OF-based firmware some
> > > > other customers may use, but I trust it isn't a lot more advanced than
> > > > what U-Boot currently has :)
> > > >
> > > > Also, the machines may have been in the wild for years, but the
> > > > ls-extirq driver was added in November 2019. So not with the
> > > > introduction of the SoC device trees themselves. That isn't so long ago.
> > > >
> > > > As for compatibility between old kernel and new DT: I guess you'll hear
> > > > various opinions on this one.
> > > > https://www.spinics.net/lists/linux-mips/msg07778.html
> > > >
> > > > | > Are we okay with the new device tree blobs breaking the old kernel?
> > > > |
> > > > | From my point of view, newer device trees are not required to work on
> > > > | older kernel, this would impose an unreasonable limitation and the use
> > > > | case is very limited.
> > >
> > > My views are on the opposite side. DT is an ABI, full stop. If you
> > > change something, you *must* guarantee forward *and* backward
> > > compatibility. That's because:
> > >
> > > - you don't control how updatable the firmware is
> > >
> > > - people may need to revert to other versions of the kernel because
> > > the new one is broken
> > >
> > > - there are plenty of DT users beyond Linux, and we are not creating
> > > bindings for Linux only.
> > >
> > > You may disagree with this, but for the subsystems I maintain, this is
> > > the rule I intent to stick to.
> > >
> > > M.
> > >
> > > --
> > > Without deviation from the norm, progress is not possible.
> >
> > I was just debugging an interesting issue with an old kernel not working
> > with a new DT blob, and after figuring out what the problem was (is),
> > I remembered this message and I'm curious what you have to say about it.
> >
> > I have this DT layout:
> >
> > ethernet-phy@1 {
> > reg = <0x1>;
> > interrupts-extended = <&extirq 2 IRQ_TYPE_LEVEL_LOW>;
> > };
> >
> > extirq: interrupt-controller@1ac {
> > compatible = "fsl,ls1021a-extirq";
> > <bla bla>
> > };
> >
> > I booted the new DT blob (which has "interrupts-extended") on a kernel
> > where the ls-extirq driver did not exist. This had the result of
> > of_mdiobus_phy_device_register() -> of_irq_get() returning -EPROBE_DEFER
> > forever and ever. So the PHY driver in turn never probed, and Ethernet
> > was broken. So I had to delete the interrupts OF property to let the PHY
> > at least work in poll mode.
> >
> > What went wrong here in your opinion?
>
> I'm not sure what you expect me to say here. You have a device that
> references an interrupt. The DT seems sound (I don't get why you think
> "interrupt-extended" is a problem here, but hey...).
>
> If your kernel doesn't have a driver for the interrupt controller
> referenced here, what do you expect, other than things not working?
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
I was just raising this as what I thought would be a simple and
non-controversial counter example to your remark "If you change something,
you *must* guarantee forward *and* backward compatibility."
Practically speaking, what has happened is that the board DT appeared in
kernel N, the ls-extirq driver in kernel N+1, and the DT was updated to
enable PHY interrupts in kernel N+2. That DT update practically broke
kernel N from running correctly on DTs taken from kernel N+2 onwards.
This is the observable behavior, we can find as many justifications for
it as we wish.
(as to what I expect, Ethernet PHYs work without an interrupt too, but
of_mdiobus_phy_device_register() treats -EPROBE_DEFER from of_irq_get()
as special, because it assumes the IRQ domain will eventually come up.
The IRQ is optional, as evidenced by the fact that kernel N worked)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-03-24 17:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 1:37 [RFC PATCH devicetree 00/10] Do something about ls-extirq interrupt-map breakage Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 01/10] irqchip/ls-extirq: rename "interrupt-map" OF property to "fsl, extirq-map" Vladimir Oltean
2021-12-14 8:46 ` [RFC PATCH devicetree 01/10] irqchip/ls-extirq: rename "interrupt-map" OF property to "fsl,extirq-map" Kurt Kanzenbach
2021-12-14 15:07 ` Rob Herring
2021-12-14 1:37 ` [RFC PATCH devicetree 02/10] Revert "arm64: dts: freescale: Fix 'interrupt-map' parent address cells" Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 03/10] dt-bindings: ls-extirq: replace "interrupt-map" documentation with "fsl, extirq-map" Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 04/10] arm64: dts: ls1043a: rename the "interrupt-map" of the extirq node to " Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 05/10] arm64: dts: ls1046a: " Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 06/10] arm64: dts: ls1088a: " Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 07/10] arm64: dts: ls208xa: " Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 08/10] arm64: dts: lx2160a: " Vladimir Oltean
2021-12-14 1:37 ` [RFC PATCH devicetree 09/10] ARM: dts: ls1021a: " Vladimir Oltean
2021-12-14 1:38 ` [RFC PATCH devicetree 10/10] dt-bindings: ls-extirq: add a YAML schema for the validator Vladimir Oltean
2021-12-14 15:21 ` Rob Herring
2021-12-14 8:51 ` [RFC PATCH devicetree 00/10] Do something about ls-extirq interrupt-map breakage Marc Zyngier
2021-12-14 9:58 ` Vladimir Oltean
2021-12-14 10:20 ` Marc Zyngier
2021-12-14 10:30 ` Vladimir Oltean
2021-12-14 10:39 ` Marc Zyngier
2021-12-14 10:53 ` Vladimir Oltean
2021-12-14 11:11 ` Marc Zyngier
2022-03-24 17:10 ` Vladimir Oltean
2022-03-24 17:21 ` Marc Zyngier
2022-03-24 17:34 ` Vladimir Oltean [this message]
2022-03-24 18:06 ` Marc Zyngier
2022-03-24 19:09 ` Vladimir Oltean
2022-03-24 20:14 ` Marc Zyngier
2022-03-25 10:34 ` Robin Murphy
2022-03-25 17:54 ` Vladimir Oltean
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=20220324173405.nusk6247ouvek46y@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=biwen.li@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=kurt@linutronix.de \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=maz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=zhiqiang.hou@nxp.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