aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fwnode.h
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2020-11-20 18:02:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-09 19:14:48 +0100
commitf9aa460672c9c56896cdc12a521159e3e67000ba (patch)
treef13f2235d15d29b48f1d53f38ab956dade0d67f8 /include/linux/fwnode.h
parentefi: Update implementation of add_links() to create fwnode links (diff)
downloadlinux-dev-f9aa460672c9c56896cdc12a521159e3e67000ba.tar.xz
linux-dev-f9aa460672c9c56896cdc12a521159e3e67000ba.zip
driver core: Refactor fw_devlink feature
The current implementation of fw_devlink is very inefficient because it tries to get away without creating fwnode links in the name of saving memory usage. Past attempts to optimize runtime at the cost of memory usage were blocked with request for data showing that the optimization made significant improvement for real world scenarios. We have those scenarios now. There have been several reports of boot time increase in the order of seconds in this thread [1]. Several OEMs and SoC manufacturers have also privately reported significant (350-400ms) increase in boot time due to all the parsing done by fw_devlink. So this patch uses all the setup done by the previous patches in this series to refactor fw_devlink to be more efficient. Most of the code has been moved out of firmware specific (DT mostly) code into driver core. This brings the following benefits: - Instead of parsing the device tree multiple times during bootup, fw_devlink parses each fwnode node/property only once and creates fwnode links. The rest of the fw_devlink code then just looks at these fwnode links to do rest of the work. - Makes it much easier to debug probe issue due to fw_devlink in the future. fw_devlink=on blocks the probing of devices if they depend on a device that hasn't been added yet. With this refactor, it'll be very easy to tell what that device is because we now have a reference to the fwnode of the device. - Much easier to add fw_devlink support to ACPI and other firmware types. A refactor to move the common bits from DT specific code to driver core was in my TODO list as a prerequisite to adding ACPI support to fw_devlink. This series gets that done. [1] - https://lore.kernel.org/linux-omap/ea02f57e-871d-cd16-4418-c1da4bbc4696@ti.com/ Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201121020232.908850-17-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fwnode.h')
0 files changed, 0 insertions, 0 deletions