Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT

Add a build time equivalent of fw_devlink.sync_state=timeout so that
board specific kernels could enable it and not have to deal with setting
or cluttering the kernel commandline.

Cc: Doug Anderson <dianders@chromium.org>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230317205134.964098-1-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Saravana Kannan and committed by
Greg Kroah-Hartman
8ad266d1 517d4927

+17
+12
drivers/base/Kconfig
··· 230 230 Enable support for generic NUMA implementation. Currently, RISC-V 231 231 and ARM64 use it. 232 232 233 + config FW_DEVLINK_SYNC_STATE_TIMEOUT 234 + bool "sync_state() behavior defaults to timeout instead of strict" 235 + help 236 + This is build time equivalent of adding kernel command line parameter 237 + "fw_devlink.sync_state=timeout". Give up waiting on consumers and 238 + call sync_state() on any devices that haven't yet received their 239 + sync_state() calls after deferred_probe_timeout has expired or by 240 + late_initcall() if !CONFIG_MODULES. You should almost always want to 241 + select N here unless you have already successfully tested with the 242 + command line option on every system/board your kernel is expected to 243 + work on. 244 + 233 245 endmenu
+5
drivers/base/core.c
··· 1671 1671 #define FW_DEVLINK_SYNC_STATE_STRICT 0 1672 1672 #define FW_DEVLINK_SYNC_STATE_TIMEOUT 1 1673 1673 1674 + #ifndef CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT 1674 1675 static int fw_devlink_sync_state; 1676 + #else 1677 + static int fw_devlink_sync_state = FW_DEVLINK_SYNC_STATE_TIMEOUT; 1678 + #endif 1679 + 1675 1680 static int __init fw_devlink_sync_state_setup(char *arg) 1676 1681 { 1677 1682 if (!arg)