[PATCH 0/2] power: reset: pscrr: record reset cause on panic and watchdog pretimeout

Faruque Ansari <[email protected]> Tue, 14 Jul 2026 15:22:33 +0530
Newsgroups org.kernel.vger.linux-watchdog,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm
Message-ID <[email protected]>
This series extends the Power State Change Reason Register (PSCRR)[1]
framework to capture two additional reset causes.

  1. Kernel panic — a panic notifier writes PSCR_KERNEL_PANIC to NVMEM
     before the system resets, so the next boot can distinguish a panic
     from other reset causes.

  2. Watchdog pretimeout — set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT) is
     called from watchdog_notify_pretimeout(), when the watchdog fire its
     pre-reset notification before resetting the system, so the reason gets
     saved and we know its was a watchdog timeout that caused the reset.

[1] https://lore.kernel.org/lkml/[email protected]/

To: Sebastian Reichel <[email protected]>
To: Wim Van Sebroeck <[email protected]>
To: Guenter Roeck <[email protected]>
To: Srinivas Kandagatla <[email protected]>
To: Benson Leung <[email protected]>
To: Tzung-Bi Shih <[email protected]>
To: Daniel Lezcano <[email protected]>
To: Oleksij Rempel <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Liam Girdwood" <[email protected]>
Cc: Mark Brown" <[email protected]>
Cc: Rafael J. Wysocki" <[email protected]>
Cc: Zhang Rui" <[email protected]>
Cc: Lukasz Luba" <[email protected]>
Cc: Søren Andersen" <[email protected]>
Cc: Guenter Roeck" <[email protected]>
Cc: Matti Vaittinen" <[email protected]>
Cc: Ahmad Fatoum" <[email protected]>
Cc: Andrew Morton" <[email protected]>
Cc: [email protected]
Cc: Umang Chheda <[email protected]>

Signed-off-by: Faruque Ansari <[email protected]>
---
Faruque Ansari (2):
      power: reset: pscrr: add kernel panic reason tracking
      watchdog: pscrr: add watchdog pretimeout reason tracking

 drivers/power/reset/pscrr.c            | 33 +++++++++++++++++++++++++++++++++
 drivers/watchdog/watchdog_pretimeout.c |  3 +++
 include/linux/power/power_on_reason.h  |  2 ++
 include/linux/reboot.h                 |  2 ++
 kernel/reboot.c                        |  2 ++
 5 files changed, 42 insertions(+)
---
base-commit: 9696e3e0e12695f18c26e339bc609a2d56b51c5a
change-id: 20260714-pscrr-reboot-reason-2b4e16ccb6b8

Best regards,
-- 
Faruque Ansari <[email protected]>