[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+91WBF7VPkHQOAju5Hky=snNj44H3-xy9xM3hzN2N=2Q@mail.gmail.com>
Date: Wed, 16 Sep 2020 09:18:49 -0600
From: Rob Herring <robh@...nel.org>
To: Marc Zyngier <maz@...nel.org>
Cc: devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Frank Wunderlich <linux@...web.de>,
John Stultz <john.stultz@...aro.org>,
Saravana Kannan <saravanak@...gle.com>,
Hanks Chen <hanks.chen@...iatek.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Frank Rowand <frowand.list@...il.com>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH 0/6] irqchip: Hybrid probing
On Wed, Sep 16, 2020 at 2:51 AM Marc Zyngier <maz@...nel.org> wrote:
>
> On 2020-09-15 22:13, Rob Herring wrote:
> > On Sat, Sep 12, 2020 at 01:51:42PM +0100, Marc Zyngier wrote:
> >> A recent attempt at converting a couple of interrupt controllers from
> >> early probing to standard platform drivers have badly failed, as it
> >> became evident that although an interrupt controller can easily probe
> >> late, device drivers for the endpoints connected to it are rarely
> >> equipped to deal with probe deferral. Changes were swiftly reverted.
> >>
> >> However, there is some value in *optionally* enabling this, if only
> >> for development purposes, as there is otherwise a "chicken and egg"
> >> problem, and a few people (cc'd) are working on a potential solution.
> >>
> >> This short series enables the infrastructure for modular building
> >> whilst retaining the usual early probing for monolithic build, and
> >> introduces it to the three drivers that were previously made to probe
> >> as platform drivers.
> >
> > I hardly expected more OF_DECLARE macros when I opened this up. Given
> > desires to get rid of them, I don't think adding to it is the way
> > forward. That wrapping a platform driver around OF_DECLARE looks pretty
> > horrible IMO.
>
> Nobody said it was cute. It's a band aid that allows us to move from the
> status-quo that exists today. How would you propose we allow people to
> go and start "fixing" drivers if you don't give them the opportunity
> to even start trying?
Apply the reverted patches and start fixing the drivers.
> > I browsed some of the discussion around this. It didn't seem like it's
> > a large number of drivers that have to be fixed to defer probe
> > correctly. Am I missing something?
>
> Well, that was enough drivers for the two platforms that had it enabled
> to break horribly, without a way to go back to a working state. Do you
> find that acceptable? I don't.
I understand reverting for v5.9, that was the right choice. But
Mediatek had 3 drivers broken. Is there more to it than getting
EPROBE_DEFER handled correctly in those drivers?
> > I'd rather keep the pressure on getting fw_devlink on by default.
>
> So far, fw_devlink breaks everything under the sun, even without modular
> irqchips. Most of my systems fail to boot if I enable it. So yes, it
> really needs some work. And this series allows this work to happen.
I think we can do something more simple here. We just need to
instantiate the irqchip devices earlier to get them to probe first and
not cause deferrals. That's just a matter of calling
of_platform_device_create() in an earlier initcall (<=
arch_initcall_sync ('=' because of link order)). Then once dependent
drivers are all fixed, all that has to be done is rip out that
initcall and the default of_platform_populate call will create the
device instead.
Rob
Powered by blists - more mailing lists