All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Support reboot power-off driver as module
@ 2019-11-08 23:40 Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
  0 siblings, 2 replies; 8+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

This series supports reboot power-off driver as a module by exporting
reboot_mode symbol.

Changes since V1:
 - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL

Elliot Berman (2):
  reboot: Export reboot_mode
  power: reset: Enable tristate on restart power-off driver

 drivers/power/reset/Kconfig | 2 +-
 kernel/reboot.c             | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
@ 2019-11-08 23:40 ` Elliot Berman
  2019-11-09  0:18   ` Bjorn Andersson
                     ` (2 more replies)
  2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
  1 sibling, 3 replies; 8+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

Export reboot_mode to support kernel modules wishing to modify reboot_mode.

Signed-off-by: Elliot Berman <eberman@codeaurora.org>
---
 kernel/reboot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/reboot.c b/kernel/reboot.c
index c4d472b..b1fbc22 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
 #define DEFAULT_REBOOT_MODE
 #endif
 enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
+EXPORT_SYMBOL_GPL(reboot_mode);
 enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
+EXPORT_SYMBOL_GPL(panic_reboot_mode);
 
 /*
  * This variable is used privately to keep track of whether or not
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver
  2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
@ 2019-11-08 23:40 ` Elliot Berman
  2019-12-19  0:08   ` Sebastian Reichel
  1 sibling, 1 reply; 8+ messages in thread
From: Elliot Berman @ 2019-11-08 23:40 UTC (permalink / raw)
  To: sre, tkjos, gregkh
  Cc: tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm, Elliot Berman

Since reboot_mode is an exported symbol, restart power-off driver can be
compiled as module.

Signed-off-by: Elliot Berman <eberman@codeaurora.org>
---
 drivers/power/reset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index a564237..8db1d9d 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -150,7 +150,7 @@ config POWER_RESET_QNAP
 	  Say Y if you have a QNAP NAS.
 
 config POWER_RESET_RESTART
-	bool "Restart power-off driver"
+	tristate "Restart power-off driver"
 	help
 	  Some boards don't actually have the ability to power off.
 	  Instead they restart, and u-boot holds the SoC until the
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
@ 2019-11-09  0:18   ` Bjorn Andersson
  2019-11-09  8:38   ` Greg KH
       [not found]   ` <CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2019-11-09  0:18 UTC (permalink / raw)
  To: Elliot Berman; +Cc: sre, tkjos, gregkh, tsoni, rananta, linux-kernel, linux-pm

On Fri 08 Nov 15:40 PST 2019, Elliot Berman wrote:

> Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Elliot Berman <eberman@codeaurora.org>
> ---
>  kernel/reboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index c4d472b..b1fbc22 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
>  #define DEFAULT_REBOOT_MODE
>  #endif
>  enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
> +EXPORT_SYMBOL_GPL(reboot_mode);
>  enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
> +EXPORT_SYMBOL_GPL(panic_reboot_mode);
>  
>  /*
>   * This variable is used privately to keep track of whether or not
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

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

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
  2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
  2019-11-09  0:18   ` Bjorn Andersson
@ 2019-11-09  8:38   ` Greg KH
       [not found]   ` <CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2019-11-09  8:38 UTC (permalink / raw)
  To: Elliot Berman
  Cc: sre, tkjos, tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm

On Fri, Nov 08, 2019 at 03:40:51PM -0800, Elliot Berman wrote:
> Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> 
> Signed-off-by: Elliot Berman <eberman@codeaurora.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver
  2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
@ 2019-12-19  0:08   ` Sebastian Reichel
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastian Reichel @ 2019-12-19  0:08 UTC (permalink / raw)
  To: Elliot Berman
  Cc: tkjos, gregkh, tsoni, rananta, bjorn.andersson, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

Hi,

On Fri, Nov 08, 2019 at 03:40:52PM -0800, Elliot Berman wrote:
> Since reboot_mode is an exported symbol, restart power-off driver can be
> compiled as module.
> 
> Signed-off-by: Elliot Berman <eberman@codeaurora.org>
> ---

I tried applying this for 5.6, but it fails to build with
allmodconfig on arm:

ERROR: "machine_restart" [drivers/power/reset/restart-poweroff.ko] undefined!

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
       [not found]   ` <CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com>
@ 2021-05-24 12:34     ` Greg Kroah-Hartman
  2021-05-25  3:32     ` Bjorn Andersson
  1 sibling, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-24 12:34 UTC (permalink / raw)
  To: Lee Jones
  Cc: Elliot Berman, Sebastian Reichel, Todd Kjos, Trilok Soni,
	rananta, Bjorn Andersson, open list, open list:THERMAL,
	Andrew Morton

On Mon, May 24, 2021 at 01:09:18PM +0100, Lee Jones wrote:
> On Fri, 8 Nov 2019 at 23:41, Elliot Berman <eberman@codeaurora.org> wrote:
> 
> > Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> >
> > Signed-off-by: Elliot Berman <eberman@codeaurora.org>
> > ---
> >  kernel/reboot.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> 
> Reviewed by Bjorn and GregKH, but never merged.
> 
> I guess all the parties are still solving this downstream.
> 
> Andrew, is this still something you'd consider?

If there is no in-kernel user, it does not need to be exported.

thanks,

greg k-h

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

* Re: [PATCH v2 1/2] reboot: Export reboot_mode
       [not found]   ` <CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com>
  2021-05-24 12:34     ` Greg Kroah-Hartman
@ 2021-05-25  3:32     ` Bjorn Andersson
  1 sibling, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2021-05-25  3:32 UTC (permalink / raw)
  To: Lee Jones
  Cc: Elliot Berman, Sebastian Reichel, Todd Kjos, Greg Kroah-Hartman,
	Trilok Soni, rananta, open list, open list:THERMAL,
	Andrew Morton

On Mon 24 May 07:09 CDT 2021, Lee Jones wrote:

> On Fri, 8 Nov 2019 at 23:41, Elliot Berman <eberman@codeaurora.org> wrote:
> 
> > Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> >
> > Signed-off-by: Elliot Berman <eberman@codeaurora.org>
> > ---
> >  kernel/reboot.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> 
> Reviewed by Bjorn and GregKH, but never merged.
> 
> I guess all the parties are still solving this downstream.
> 
> Andrew, is this still something you'd consider?
> 

Seems more reasonable that it would go together with patch 2, which
Sebastian pointed out doesn't build.

Regards,
Bjorn

> diff --git a/kernel/reboot.c b/kernel/reboot.c
> > index c4d472b..b1fbc22 100644
> > --- a/kernel/reboot.c
> > +++ b/kernel/reboot.c
> > @@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
> >  #define DEFAULT_REBOOT_MODE
> >  #endif
> >  enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
> > +EXPORT_SYMBOL_GPL(reboot_mode);
> >  enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
> > +EXPORT_SYMBOL_GPL(panic_reboot_mode);
> >
> >  /*
> >   * This variable is used privately to keep track of whether or not
> > --
> > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > a Linux Foundation Collaborative Project
> >
> >
> 
> -- 
> Lee Jones [?????????]
> Linaro Services Senior Technical Lead
> Linaro.org ??? Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2021-05-25  3:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 23:40 [PATCH v2 0/2] Support reboot power-off driver as module Elliot Berman
2019-11-08 23:40 ` [PATCH v2 1/2] reboot: Export reboot_mode Elliot Berman
2019-11-09  0:18   ` Bjorn Andersson
2019-11-09  8:38   ` Greg KH
     [not found]   ` <CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com>
2021-05-24 12:34     ` Greg Kroah-Hartman
2021-05-25  3:32     ` Bjorn Andersson
2019-11-08 23:40 ` [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver Elliot Berman
2019-12-19  0:08   ` Sebastian Reichel

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.