Re: [PATCH v1 0/9] fw_devlink improvements
From: Geert Uytterhoeven
Date: Wed Aug 17 2022 - 09:02:02 EST
Hi Saravana,
On Wed, Aug 10, 2022 at 8:00 AM Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
> This patch series improves fw_devlink in the following ways:
>
> 1. It no longer cares about a fwnode having a "compatible" property. It
> figures this our more dynamically. The only expectation is that
> fwnode that are converted to devices actually get probed by a driver
> for the dependencies to be enforced correctly.
>
> 2. Finer grained dependency tracking. fw_devlink will now create device
> links from the consumer to the actual resource's device (if it has one,
> Eg: gpio_device) instead of the parent supplier device. This improves
> things like async suspend/resume ordering, potentially remove the need
> for frameworks to create device links, more parallelized async probing,
> and better sync_state() tracking.
>
> 3. Handle hardware/software quirks where a child firmware node gets
> populated as a device before its parent firmware node AND actually
> supplies a non-optional resource to the parent firmware node's
> device.
>
> 4. Way more robust at cycle handling (see patch for the insane cases).
>
> 5. Stops depending on OF_POPULATED to figure out some corner cases.
>
> 6. Simplifies the work that needs to be done by the firmware specific
> code.
>
> This took way too long to get done due to typo bugs I had in my rewrite or
> corner cases I had to find and handle. But it's fairly well tested at this
> point and I expect this to work properly.
>
> Abel & Doug,
>
> This should fix your cyclic dependency issues with your display. Can you
> give it a shot please?
Thanks for to your series!
> Geert,
>
> Can you test the renesas stuff I changed please? They should continue
> working like before. Any other sanity test on other hardware would be
> great too.
At first, this series looked like a total disaster, introducing
several regressions[1].
However, after applying the additional fix from
https://lore.kernel.org/lkml/CAGETcx-JUV1nj8wBJrTPfyvM7=Mre5j_vkVmZojeiumUGG6QZQ@xxxxxxxxxxxxxx
all regressions[1] went away, and /sys/kernel/debug/devices_deferred
is empty again.
Note that the Ethernet PHY interrupt on Koelsch is not fixed, so the issue from
https://lore.kernel.org/all/CAMuHMdWo_wRwV-i_iyTxVnEsf3Th9GBAG+wxUQMQGnw1t2ijTg@xxxxxxxxxxxxxx/
is still present.
Summary: while this series (+ the additional fix) doesn't seem to
introduce any regressions on Renesas ARM platforms, it doesn't seem
to fix anything for me neither.
Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
[1]
R-Mobile APE6 (ape6evm):
No "deferred probe pending" messages?
# cat /sys/kernel/debug/devices_deferred
ee120000.mmc platform: wait for supplier sd1
ee100000.mmc platform: wait for supplier sd0
ee200000.mmc platform: wait for supplier mmc0
keyboard platform: wait for supplier keyboard
R-Mobile A1 (armadillo-800-eva):
No soundcards found.
platform backlight: deferred probe pending
i2c 0-0030: deferred probe pending (RTC)
platform sound: deferred probe pending
platform fe1f0000.sound: deferred probe pending
platform keyboard: deferred probe pending (gpio-keys)
platform e6850000.mmc: deferred probe pending (SDHI)
platform e6bd0000.mmc: deferred probe pending (SDHI)
# cat /sys/kernel/debug/devices_deferred
backlight platform: wait for supplier backlight
0-0030 i2c: wait for supplier rtc
sound asoc-simple-card: parse error
fe1f0000.sound platform: wait for supplier sounda
keyboard platform: wait for supplier keyboard
e6850000.mmc platform: wait for supplier sd0
e6bd0000.mmc platform: wait for supplier mmc0
SH-Mobile AG5 (kzm9g):
No soundcards found.
platform sound: deferred probe pending
platform ec230000.sound: deferred probe pending
# cat /sys/kernel/debug/devices_deferred
sound asoc-simple-card: parse error
ec230000.sound platform: wait for supplier sounda
Note: This is the only board where gpio-keys still works!
R-Car M2-W (koelsch):
i2c-demux-pinctrl i2c-12: failed to setup demux-adapter 0 (-19)
i2c-demux-pinctrl i2c-13: failed to setup demux-adapter 0 (-19)
i2c-demux-pinctrl i2c-14: failed to setup demux-adapter 0 (-19)
i2c-demux-pinctrl i2c-13: Failed to create device link with hdmi-in
i2c-demux-pinctrl i2c-13: Failed to create device link with hdmi-out
No soundcards found.
Some I2C-busses are missing, but not listed in
/sys/kernel/debug/devices_deferred?
/devices/platform/soc/e6518000.i2c
/devices/platform/soc/e6530000.i2c
/devices/platform/soc/e6520000.i2c
platform keyboard: deferred probe pending
platform sound: deferred probe pending
platform feb00000.display: deferred probe pending
# cat /sys/kernel/debug/devices_deferred
keyboard platform: wait for supplier keyboard
sound asoc-simple-card: parse error
feb00000.display rcar-du: failed to initialize DRM/KMS
R-Car Gen3 (Salvator-X(S), Ebisu)
platform keys: deferred probe pending (gpio-keys)
# cat /sys/kernel/debug/devices_deferred
keys platform: wait for supplier keys
RZ/A (rskrza1, rza2mevb)
No "deferred probe pending" messages?
# cat /sys/kernel/debug/devices_deferred
keyboard platform: wait for supplier keyboard
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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