Re: [PATCH v6] amba: Remove deferred device addition

From: Russell King (Oracle)
Date: Wed Jul 27 2022 - 18:18:12 EST


On Wed, Jul 27, 2022 at 11:19:35AM -0700, Saravana Kannan wrote:
> The uevents generated for an amba device need PID and CID information
> that's available only when the amba device is powered on, clocked and
> out of reset. So, if those resources aren't available, the information
> can't be read to generate the uevents. To workaround this requirement,
> if the resources weren't available, the device addition was deferred and
> retried periodically.
>
> However, this deferred addition retry isn't based on resources becoming
> available. Instead, it's retried every 5 seconds and causes arbitrary
> probe delays for amba devices and their consumers.
>
> Also, maintaining a separate deferred-probe like mechanism is
> maintenance headache.
>
> With this commit, instead of deferring the device addition, we simply
> defer the generation of uevents for the device and probing of the device
> (because drivers needs PID and CID to match) until the PID and CID
> information can be read. This allows us to delete all the amba specific
> deferring code and also avoid the arbitrary probing delays.

Oh, this is absolutely horrible. I can apply it cleanly to my "misc"
branch, but it then conflicts when I re-merge my tree for the for-next
thing (which is only supposed to be for sfr - the hint is in the name!)
for-next is basically my "fixes" plus "misc" branch and anything else I
want sfr to pick up for the -next tree.

Applying this has to be on top of that merge commit, otherwise the
conflicts are horrid, but that then means I need to send Linus the
for-next merge commit (which I don't normally do.)

Gah, we have too many changes to drivers/bus/amba.c in this cycle,
some of them which have been submitted for 5.19 as fixes (and thus
are not in 5.18-rc1 which the misc branch is based upon for other
patch dependency reasons) and others in the misc branch for the next
cycle - and now your patch wants both, which I can't do without
rebasing the misc branch.

Sadly, getting these changes into GregKH's tree will just create a
conflict between Greg's tree and my tree.

Can we postpone this please?

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!