Skip to content
Commit 486a64b2 authored by Meng Li's avatar Meng Li Committed by Wim Van Sebroeck
Browse files

watchdog: core: stop watchdog when executing poweroff command



On some platforms, for example, Intel SoC FPGA platform, the watchdog
is started in u-boot, and so kernel will create a timer and work to
keep watchdog alive. But when user executes commands "poweroff" or
"shutdown -h", the system is reset when watchdog triggers timeout even
if WDOG_STOP_ON_REBOOT is set in watchdog driver. The root cause is
that the watchdog is not stopped properly because the SYS_POWER_OFF case
is not supported in notify callback function. So, add this case to stop
watchdog when executing poweroff command.

Signed-off-by: default avatarMeng Li <Meng.Li@windriver.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230814090616.1853263-1-Meng.Li@windriver.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 89e5e28e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment