Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] power: reset: pscrr: record reset cause on panic and watchdog pretimeout
@ 2026-07-22 15:12 Faruque Ansari
  2026-07-22 15:13 ` [PATCH v2 1/3] power: reset: pscrr: add kernel panic reason tracking Faruque Ansari
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Faruque Ansari @ 2026-07-22 15:12 UTC (permalink / raw)
  To: Sebastian Reichel, Wim Van Sebroeck, Guenter Roeck, Benson Leung,
	Tzung-Bi Shih, Oleksij Rempel, Srinivas Kandagatla,
	Daniel Lezcano
  Cc: linux-pm, linux-kernel, linux-watchdog, linux-arm-msm, kernel,
	Liam Girdwood, Mark Brown, Rafael J. Wysocki, Zhang Rui,
	Lukasz Luba, Søren Andersen, Guenter Roeck, Matti Vaittinen,
	Ahmad Fatoum, Andrew Morton, avaneesh.dwivedi, Umang Chheda,
	linux-arm-msm, Faruque Ansari

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/20250618120255.3141862-1-o.rempel@pengutronix.de/

Changes in v2:
  - Split patch 2/2 into two patches as requested by Guenter Roeck:
      * Patch 2/3: power/reset — add PSCR_WATCHDOG_PRETIMEOUT and guard
          panic notifier against overwriting watchdog reason.
      * Patch 3/3: watchdog — hook set_psc_reason() into
          watchdog_notify_pretimeout().

Signed-off-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
---
Faruque Ansari (3):
      power: reset: pscrr: add kernel panic reason tracking
      power: reset: pscrr: add watchdog pretimeout reason tracking
      watchdog: pretimeout: record PSC reason on watchdog pretimeout

 drivers/power/reset/pscrr.c            | 37 ++++++++++++++++++++++++++++++++++
 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, 46 insertions(+)
---
base-commit: 7715d20f91523e0189ba9d8813f03971229d5e90
change-id: 20260721-pscrr-reboot-reason-2432962a9c4d

Best regards,
-- 
Faruque Ansari <faruque.ansari@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-30  5:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 15:12 [PATCH v2 0/3] power: reset: pscrr: record reset cause on panic and watchdog pretimeout Faruque Ansari
2026-07-22 15:13 ` [PATCH v2 1/3] power: reset: pscrr: add kernel panic reason tracking Faruque Ansari
2026-07-22 15:13 ` [PATCH v2 2/3] power: reset: pscrr: add watchdog pretimeout " Faruque Ansari
2026-07-30  4:49   ` Matti Vaittinen
2026-07-30  5:24     ` Oleksij Rempel
2026-07-22 15:13 ` [PATCH v2 3/3] watchdog: pretimeout: record PSC reason on watchdog pretimeout Faruque Ansari
2026-07-30  5:03   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox