[PATCH v3 3/3] watchdog: pretimeout: update PSC reason in panic pretimeout governor
Faruque Ansari <[email protected]> Tue, 04 Aug 2026 14:51:22 +0530
| Newsgroups | org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.linux-watchdog |
|---|---|
| Message-ID | <[email protected]> |
Update the PSC reset reason by invoking set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT) from the panic governor's pretimeout handler before calling panic(), so the reset cause is committed to persistent storage before the system goes down. Signed-off-by: Faruque Ansari <[email protected]> --- drivers/watchdog/pretimeout_panic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/pretimeout_panic.c b/drivers/watchdog/pretimeout_panic.c index 8c3ac674dc45..819487b5e6fe 100644 --- a/drivers/watchdog/pretimeout_panic.c +++ b/drivers/watchdog/pretimeout_panic.c @@ -5,6 +5,7 @@ #include <linux/kernel.h> #include <linux/module.h> +#include <linux/reboot.h> #include <linux/watchdog.h> #include "watchdog_pretimeout.h" @@ -17,6 +18,7 @@ */ static void pretimeout_panic(struct watchdog_device *wdd) { + set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT); panic("watchdog pretimeout event\n"); } -- 2.34.1