All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT
@ 2023-03-17 17:19 Saravana Kannan
  2023-03-17 17:37 ` Doug Anderson
  2023-03-17 18:11 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Saravana Kannan @ 2023-03-17 17:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki
  Cc: Saravana Kannan, Doug Anderson, kernel-team, linux-kernel

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>
---
 drivers/base/Kconfig | 12 ++++++++++++
 drivers/base/core.c  |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 6f04b831a5c0..2b8fd6bb7da0 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -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 "sync_state() behavior defaults to timeout instead of strict"
+	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
diff --git a/drivers/base/core.c b/drivers/base/core.c
index fe74a786e2c3..adc81871829f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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)
-- 
2.40.0.rc2.332.ga46443480c-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT
  2023-03-17 17:19 [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT Saravana Kannan
@ 2023-03-17 17:37 ` Doug Anderson
  2023-03-17 18:11 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Anderson @ 2023-03-17 17:37 UTC (permalink / raw)
  To: Saravana Kannan
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, kernel-team, linux-kernel

Hi,

On Fri, Mar 17, 2023 at 10:19 AM Saravana Kannan <saravanak@google.com> wrote:
>
> 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>
> ---
>  drivers/base/Kconfig | 12 ++++++++++++
>  drivers/base/core.c  |  5 +++++
>  2 files changed, 17 insertions(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT
  2023-03-17 17:19 [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT Saravana Kannan
  2023-03-17 17:37 ` Doug Anderson
@ 2023-03-17 18:11 ` Greg Kroah-Hartman
  2023-03-17 20:47   ` Saravana Kannan
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-17 18:11 UTC (permalink / raw)
  To: Saravana Kannan
  Cc: Rafael J. Wysocki, Doug Anderson, kernel-team, linux-kernel

On Fri, Mar 17, 2023 at 10:19:42AM -0700, Saravana Kannan wrote:
> 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>
> ---
>  drivers/base/Kconfig | 12 ++++++++++++
>  drivers/base/core.c  |  5 +++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index 6f04b831a5c0..2b8fd6bb7da0 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -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 "sync_state() behavior defaults to timeout instead of strict"
> +	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
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index fe74a786e2c3..adc81871829f 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -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)
> -- 
> 2.40.0.rc2.332.ga46443480c-goog
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT
  2023-03-17 18:11 ` Greg Kroah-Hartman
@ 2023-03-17 20:47   ` Saravana Kannan
  0 siblings, 0 replies; 4+ messages in thread
From: Saravana Kannan @ 2023-03-17 20:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Rafael J. Wysocki, Doug Anderson, kernel-team, linux-kernel

On Fri, Mar 17, 2023 at 11:11 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Fri, Mar 17, 2023 at 10:19:42AM -0700, Saravana Kannan wrote:
> > 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>
> > ---
> >  drivers/base/Kconfig | 12 ++++++++++++
> >  drivers/base/core.c  |  5 +++++
> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> > index 6f04b831a5c0..2b8fd6bb7da0 100644
> > --- a/drivers/base/Kconfig
> > +++ b/drivers/base/Kconfig
> > @@ -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 "sync_state() behavior defaults to timeout instead of strict"
> > +     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
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index fe74a786e2c3..adc81871829f 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -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)
> > --
> > 2.40.0.rc2.332.ga46443480c-goog
> >
>
> Hi,
>
> This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
> a patch that has triggered this response.  He used to manually respond
> to these common problems, but in order to save his sanity (he kept
> writing the same thing over and over, yet to different people), I was
> created.  Hopefully you will not take offence and will fix the problem
> in your patch and resubmit it so that it can be accepted into the Linux
> kernel tree.
>
> You are receiving this message because of the following common error(s)
> as indicated below:
>
> - This looks like a new version of a previously submitted patch, but you
>   did not list below the --- line any changes from the previous version.
>   Please read the section entitled "The canonical patch format" in the
>   kernel file, Documentation/process/submitting-patches.rst for what
>   needs to be done here to properly describe this.

Ok, I'll send out a v4 with this added in. :)

-Saravana

>
> If you wish to discuss this problem further, or you have questions about
> how to resolve this issue, please feel free to respond to this email and
> Greg will reply once he has dug out from the pending patches received
> from other developers.
>
> thanks,
>
> greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-17 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 17:19 [PATCH v3] driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT Saravana Kannan
2023-03-17 17:37 ` Doug Anderson
2023-03-17 18:11 ` Greg Kroah-Hartman
2023-03-17 20:47   ` Saravana Kannan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.