Support reboot power-off driver as module
v2 cover 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(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 1/2 reboot: Export reboot_mode
Export reboot_mode to support kernel modules wishing to modify reboot_mode.
--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/reboot.c +2 -0
@@ -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
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v2 1/2] reboot: Export reboot_mode
Quoted 2 lines · Elliot Berman
Export
reboot_modeto support kernel modules wishing to modifyreboot_mode.
Quoted 23 lines
Signed-off-by Elliot Berman <[email protected]>--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)kernel/reboot.c +2
-0@@ -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 Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v2 1/2] reboot: Export reboot_mode
In reply to Elliot BermanQuoted 3 lines · Elliot Berman
Export
reboot_modeto support kernel modules wishing to modifyreboot_mode.Signed-off-by Elliot Berman <[email protected]>
A message that is not in the archive (sent off-list or not yet received): CAF2Aj3jYtL_42h_4W5zA8uz9e-QVquja70nARSRD4vbECVjxKw@mail.gmail.com
Re: [PATCH v2 1/2] reboot: Export reboot_mode
Quoted 10 lines · Lee Jones
Quoted 7 lines · Elliot Berman
Export
reboot_modeto support kernel modules wishing to modifyreboot_mode.Signed-off-by Elliot Berman <[email protected]>--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 5 lines
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
Re: [PATCH v2 1/2] reboot: Export reboot_mode
In reply to a message not in the archiveQuoted 10 lines · Lee Jones
Quoted 7 lines · Elliot Berman
Export
reboot_modeto support kernel modules wishing to modifyreboot_mode.Signed-off-by Elliot Berman <[email protected]>--- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 6 lines
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
Quoted 25 lines
kernel/reboot.c +0
-0Quoted 18 lines
index c4d472b..b1fbc22 100644
kernel/reboot.c +2
-1@@ -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
Signature · 4 lines
Lee Jones [?????????] Linaro Services Senior Technical Lead Linaro.org ??? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 2/2 power: reset: Enable tristate on restart power-off driver
In reply to Elliot BermanSince reboot_mode is an exported symbol, restart power-off driver can be compiled as module.
--- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
@@ -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
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v2 2/2] power: reset: Enable tristate on restart power-off driver
Hi,
Quoted 5 lines · Elliot Berman
Since
reboot_modeis an exported symbol, restart power-off driver can be compiled as module.Signed-off-by Elliot Berman <[email protected]>---
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