summaryrefslogtreecommitdiffstats
path: root/kernel/reboot.c
diff options
context:
space:
mode:
authorFabio Estevam <festevam@denx.de>2023-11-29 09:43:28 -0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2024-01-02 09:33:18 +0100
commit5a0e241003b80247de59727c945bc94c848f893d (patch)
treeecb2477225fcd0b6933960a01b9426801ab5adf0 /kernel/reboot.c
parent87f67d1747bc3ce8ace14be99b47d7731041ff03 (diff)
downloadlinux-5a0e241003b80247de59727c945bc94c848f893d.tar.gz
linux-5a0e241003b80247de59727c945bc94c848f893d.tar.bz2
linux-5a0e241003b80247de59727c945bc94c848f893d.zip
thermal/core: Prepare for introduction of thermal reboot
Add some helper functions to make it easier introducing the support for thermal reboot. No functional change. Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20231129124330.519423-2-festevam@gmail.com
Diffstat (limited to 'kernel/reboot.c')
-rw-r--r--kernel/reboot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/reboot.c b/kernel/reboot.c
index 395a0ea3c7a8..b236c4c06bb3 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -957,7 +957,7 @@ static void hw_failure_emergency_poweroff(int poweroff_delay_ms)
}
/**
- * hw_protection_shutdown - Trigger an emergency system poweroff
+ * __hw_protection_shutdown - Trigger an emergency system poweroff
*
* @reason: Reason of emergency shutdown to be printed.
* @ms_until_forced: Time to wait for orderly shutdown before tiggering a
@@ -971,7 +971,7 @@ static void hw_failure_emergency_poweroff(int poweroff_delay_ms)
* if the previous request has given a large timeout for forced shutdown.
* Can be called from any context.
*/
-void hw_protection_shutdown(const char *reason, int ms_until_forced)
+void __hw_protection_shutdown(const char *reason, int ms_until_forced, bool shutdown)
{
static atomic_t allow_proceed = ATOMIC_INIT(1);
@@ -986,9 +986,9 @@ void hw_protection_shutdown(const char *reason, int ms_until_forced)
* orderly_poweroff failure
*/
hw_failure_emergency_poweroff(ms_until_forced);
- orderly_poweroff(true);
+ if (shutdown)
+ orderly_poweroff(true);
}
-EXPORT_SYMBOL_GPL(hw_protection_shutdown);
static int __init reboot_setup(char *str)
{