Re: [PATCH v3 3/3] watchdog: pretimeout: update PSC reason in panic pretimeout governor
Guenter Roeck <[email protected]> Tue, 4 Aug 2026 07:59:35 -0700
| 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]> |
On 8/4/26 02:21, Faruque Ansari wrote: > 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]> Acked-by: Guenter Roeck <[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"); > } > >