2019-11-08 23:42:11

by Elliot Berman

[permalink] [raw]
Subject: [PATCH v2 0/2] Support reboot power-off driver as module

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


2019-11-08 23:42:50

by Elliot Berman

[permalink] [raw]
Subject: [PATCH v2 1/2] reboot: Export reboot_mode

Export reboot_mode to support kernel modules wishing to modify reboot_mode.

Signed-off-by: Elliot Berman <[email protected]>
---
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

2019-11-09 00:22:55

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] reboot: Export reboot_mode

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 <[email protected]>

> Signed-off-by: Elliot Berman <[email protected]>
> ---
> 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
>

2019-11-09 08:39:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] reboot: Export reboot_mode

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 <[email protected]>

Reviewed-by: Greg Kroah-Hartman <[email protected]>

2021-05-24 12:37:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] reboot: Export reboot_mode

On Mon, May 24, 2021 at 01:09:18PM +0100, Lee Jones wrote:
> On Fri, 8 Nov 2019 at 23:41, Elliot Berman <[email protected]> wrote:
>
> > Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> >
> > Signed-off-by: Elliot Berman <[email protected]>
> > ---
> > 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

2021-05-25 04:00:23

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] reboot: Export reboot_mode

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

> On Fri, 8 Nov 2019 at 23:41, Elliot Berman <[email protected]> wrote:
>
> > Export reboot_mode to support kernel modules wishing to modify reboot_mode.
> >
> > Signed-off-by: Elliot Berman <[email protected]>
> > ---
> > 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