driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT
PATCH v2 1/1 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.
--- drivers/base/Kconfig | 12 ++++++++++++ drivers/base/core.c | 5 +++++ 2 files changed, 17 insertions(+)
drivers/base/Kconfig +12 -0
@@ -230,4 +230,16 @@ config GENERIC_ARCH_NUMA Enable support for generic NUMA implementation. Currently, RISC-V and ARM64 use it. +config FW_DEVLINK_SYNC_STATE_TIMEOUT + bool + help + This is build time equivalent of adding kernel command line parameter + "fw_devlink.sync_state=timeout". Give up waiting on consumers and + call sync_state() on any devices that haven't yet received their + sync_state() calls after deferred_probe_timeout has expired or by + late_initcall() if !CONFIG_MODULES. You should almost always want to + select N here unless you have already successfully tested with the + command line option on every system/board your kernel is expected to + work on. + endmenu
drivers/base/core.c +5 -0
@@ -1672,7 +1672,12 @@ early_param("fw_devlink.strict", fw_devlink_strict_setup);#define FW_DEVLINK_SYNC_STATE_STRICT 0#define FW_DEVLINK_SYNC_STATE_TIMEOUT 1 +#ifndef CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT static int fw_devlink_sync_state; +#else +static int fw_devlink_sync_state =FW_DEVLINK_SYNC_STATE_TIMEOUT ; +#endif +static int __init fw_devlink_sync_state_setup (char *arg) {if (!arg)
Signature · 1 line
2.40.0.rc1.284.g88254d51c5-goog
Greg Kroah-Hartman
maintainerQuoted 20 lines · Saravana Kannan
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 <[email protected]>Signed-off-by Saravana Kannan <[email protected]>--- drivers/base/Kconfig | 12 ++++++++++++ drivers/base/core.c | 5 +++++ 2 files changed, 17 insertions(+)drivers/base/Kconfig +1
-0@@ -230,4 +230,16 @@ config GENERIC_ARCH_NUMA Enable support for generic NUMA implementation. Currently, RISC-V and ARM64 use it. +config FW_DEVLINK_SYNC_STATE_TIMEOUT
drivers/base/Kconfig config GENERIC_ARCH_NUMA · line 243
Quoted 10 lines
drivers/base/Kconfig +10
-0+ bool + help + This is build time equivalent of adding kernel command line parameter + "fw_devlink.sync_state=timeout". Give up waiting on consumers and + call sync_state() on any devices that haven't yet received their + sync_state() calls after deferred_probe_timeout has expired or by + late_initcall() if !CONFIG_MODULES. You should almost always want to + select N here unless you have already successfully tested with the + command line option on every system/board your kernel is expected to + work on.
As nothing can actually select this, it doesn't make sense to add this now, right? We need a user, otherwise the automated tools will come along and remove this option when they figure out that it can't be ever used.
thanks,
greg k-h
Hi,
Quoted 21 lines · Greg Kroah-Hartman
Quoted 19 lines · Saravana Kannan
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 <[email protected]>Signed-off-by Saravana Kannan <[email protected]>--- drivers/base/Kconfig | 12 ++++++++++++ drivers/base/core.c | 5 +++++ 2 files changed, 17 insertions(+)drivers/base/Kconfig +0
-0@@ -230,4 +230,16 @@ config GENERIC_ARCH_NUMA Enable support for generic NUMA implementation. Currently, RISC-V and ARM64 use it.
Quoted 16 lines
drivers/base/Kconfig config GENERIC_ARCH_NUMA · line 243
Quoted 11 lines
drivers/base/Kconfig +11
-0+config FW_DEVLINK_SYNC_STATE_TIMEOUT + bool + help + This is build time equivalent of adding kernel command line parameter + "fw_devlink.sync_state=timeout". Give up waiting on consumers and + call sync_state() on any devices that haven't yet received their + sync_state() calls after deferred_probe_timeout has expired or by + late_initcall() if !CONFIG_MODULES. You should almost always want to + select N here unless you have already successfully tested with the + command line option on every system/board your kernel is expected to + work on.As nothing can actually select this, it doesn't make sense to add this now, right? We need a user, otherwise the automated tools will come along and remove this option when they figure out that it can't be ever used.
I think the hope was that it could be setup as a config that would show up as user selectable (like in menuconfig). Saravana: the problem is your bare "bool" above. That should be changed to a description shown to the user. Like maybe you'd want to change that to:
bool "sync_state behavior defaults to timeout instead of strict"
-Doug
Quoted 43 lines · Doug Anderson
Hi,
Quoted 21 lines · Greg Kroah-Hartman
Quoted 19 lines · Saravana Kannan
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 <[email protected]>Signed-off-by Saravana Kannan <[email protected]>--- drivers/base/Kconfig | 12 ++++++++++++ drivers/base/core.c | 5 +++++ 2 files changed, 17 insertions(+)drivers/base/Kconfig +0
-0@@ -230,4 +230,16 @@ config GENERIC_ARCH_NUMA Enable support for generic NUMA implementation. Currently, RISC-V and ARM64 use it.Quoted 16 lines
drivers/base/Kconfig config GENERIC_ARCH_NUMA · line 243
Quoted 11 lines
drivers/base/Kconfig +11
-0+config FW_DEVLINK_SYNC_STATE_TIMEOUT + bool + help + This is build time equivalent of adding kernel command line parameter + "fw_devlink.sync_state=timeout". Give up waiting on consumers and + call sync_state() on any devices that haven't yet received their + sync_state() calls after deferred_probe_timeout has expired or by + late_initcall() if !CONFIG_MODULES. You should almost always want to + select N here unless you have already successfully tested with the + command line option on every system/board your kernel is expected to + work on.As nothing can actually select this, it doesn't make sense to add this now, right? We need a user, otherwise the automated tools will come along and remove this option when they figure out that it can't be ever used.
Quoted 6 lines
I think the hope was that it could be setup as a config that would show up as user selectable (like in menuconfig). Saravana: the problem is your bare "bool" above. That should be changed to a description shown to the user. Like maybe you'd want to change that to:
bool "
sync_statebehavior defaults to timeout instead of strict"
Ah, thanks. Will do this.
-Saravana