From: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
To: Sebastian Reichel <sre@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
Benson Leung <bleung@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Oleksij Rempel <o.rempel@pengutronix.de>,
Srinivas Kandagatla <srini@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-arm-msm@vger.kernel.org,
kernel@pengutronix.de, "Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Zhang Rui" <rui.zhang@intel.com>,
"Lukasz Luba" <lukasz.luba@arm.com>,
"Søren Andersen" <san@skov.dk>,
"Guenter Roeck" <groeck@chromium.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
avaneesh.dwivedi@oss.qualcomm.com,
"Umang Chheda" <umang.chheda@oss.qualcomm.com>,
"Faruque Ansari" <faruque.ansari@oss.qualcomm.com>
Subject: [PATCH v3 0/3] power: reset: pscrr: record reset cause on panic and watchdog pretimeout
Date: Tue, 04 Aug 2026 14:51:19 +0530 [thread overview]
Message-ID: <20260804-pscrr-reboot-reason-v3-0-e706dbfc7465@oss.qualcomm.com> (raw)
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 pretimeout_panic(), 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/all/20260731095959.296056-1-o.rempel@pengutronix.de/
Changes in v3:
- Update patch 3/3 based on Guenter Roeck's feedback:
* Move set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT) from
watchdog_notify_pretimeout() to pretimeout_panic().
Changes in v2:
https://lore.kernel.org/lkml/20260722-pscrr-reboot-reason-v2-0-495ba3005953@oss.qualcomm.com/
- 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: update PSC reason in panic pretimeout governor
drivers/power/reset/pscrr/pscrr.c | 30 ++++++++++++++++++++++++++++++
drivers/watchdog/pretimeout_panic.c | 2 ++
include/linux/power/power_on_reason.h | 1 +
include/linux/reboot.h | 3 +++
kernel/reboot.c | 1 +
5 files changed, 37 insertions(+)
---
base-commit: 551961df5728932d968a4aae534714acfa43f3a1
change-id: 20260803-pscrr-reboot-reason-f1254965ec0d
Best regards,
--
Faruque Ansari <faruque.ansari@oss.qualcomm.com>
next reply other threads:[~2026-08-04 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 9:21 Faruque Ansari [this message]
2026-08-04 9:21 ` [PATCH v3 1/3] power: reset: pscrr: add kernel panic reason tracking Faruque Ansari
2026-08-04 9:21 ` [PATCH v3 2/3] power: reset: pscrr: add watchdog pretimeout " Faruque Ansari
2026-08-04 9:21 ` [PATCH v3 3/3] watchdog: pretimeout: update PSC reason in panic pretimeout governor Faruque Ansari
2026-08-04 14:59 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804-pscrr-reboot-reason-v3-0-e706dbfc7465@oss.qualcomm.com \
--to=faruque.ansari@oss.qualcomm.com \
--cc=a.fatoum@pengutronix.de \
--cc=akpm@linux-foundation.org \
--cc=avaneesh.dwivedi@oss.qualcomm.com \
--cc=bleung@chromium.org \
--cc=broonie@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=groeck@chromium.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lukasz.luba@arm.com \
--cc=mazziesaccount@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=san@skov.dk \
--cc=sre@kernel.org \
--cc=srini@kernel.org \
--cc=tzungbi@kernel.org \
--cc=umang.chheda@oss.qualcomm.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox