Repository navigation
[26.04_linux-nvidia-bos] NVIDIA: SAUCE: watchdog: sbsa_gwdt: stop ping worker during system sleep - #633
Conversation
BaseOS Kernel ReviewTip ✅ Review passedNo issues found across the reviewed commits. Findings: none 🔍 Review artifacts
📦 Build checks — 🟢 4/4 passed
Note Build reports and debs are retained for 10 days after the PR closes.
Review metadata
This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review. |
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ✅ All checks passedDetailsChecking 1 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 011bf55bddb1 │ [SAUCE] watchdog: sbsa_gwdt: stop mt8901 ping worker during susp │ N/A │ N/A │ bdintaku │ └──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘ Lint: all checks passed. |
|
I am not sure if this is the same medium finding from Boro but this is what I see from Codex: |
|
My review had this finding, however it called it out as an existing coverage gap (which I think Carol's finding also falls under that category). So please review, but IMO these could be pursued in a separate follow-on PR (or added to this PR as a series). [P2] A watchdog registered during suspend entry can miss core timer cancellation. If an SBSA probe completes after PM_SUSPEND_PREPARE, the driver can correctly park the hardware while watchdog registration starts the core’s keepalive timer for a firmware-enabled or early_enable watchdog. watchdog_stop_ping_on_suspend() registers a PM notifier, but the completed prepare event is not replayed. The driver’s later .prepare() callback only handles the hardware, leaving the software timer armed. Consequently, that suspend attempt can still suffer an unwanted timer-triggered wakeup. A complete fix would also quiesce the core timer when registering a watchdog during an ongoing sleep transition. This is an existing coverage gap, not a new regression. It requires probing to overlap suspend entry and does not affect the usual case where the watchdog was registered at boot. |
|
@nvmochs Thanks, agreed. This is an existing coverage gap limited to watchdog registration overlapping suspend entry, and it does not affect the normal boot-registered path addressed here. We will track the late-registration/core-timer coordination separately rather than expanding this fix. |
|
No further issues from me.
|
52bfb69 to
2681aa0
Compare
|
@clsotog Thanks, fixed in the latest revision. After the SBSA resume path refreshes the hardware, it now updates last_hw_keepalive while the core ping worker is quiesced, so the next ping is scheduled from the actual resume refresh rather than the stale pre-suspend timestamp. |
Thanks for the fix. Codex found another one. |
2681aa0 to
ad8094e
Compare
|
Findings: [P1] New finding: suspend-side timer cancellation can be undone before tasks freeze. |
ad8094e to
8e68285
Compare
|
Thanks, Carol. To avoid a broader watchdog-core redesign, I narrowed this change to the MediaTek SBSA action=1 configuration used on MT8901. This PR now only enables the existing suspend-time ping cancellation hook for action=1; action=0 remains unchanged. The core re-arm and late-registration windows remain separate issues. |
|
The first finding is resolved.
I maybe have this question about this PR: |
|
@clsotog Thank you. The prepare-to-freeze rearm window is an existing limitation of the watchdog-core hook, not introduced by this PR. This change enables that hook for the MediaTek SBSA watchdog in action=1 mode to address the reproduced SYS_TIMER wake. It is not intended to prevent a userspace ping in that window. I’ll discuss the core race with the team as a separate follow-up |
Based on this I can ack. |
|
Please add the following Please also wrap the commit-message body at 72 columns, keeping the Otherwise, this change looks fine to me. |
…spend On MediaTek SBSA watchdogs in action=1 mode, the sleep notifier parks the hardware watchdog, but the watchdog-core keepalive timer remains armed. Its SYS_TIMER interrupt can wake MT8901 from S3 even though the hardware watchdog is parked. Use the existing watchdog-core PM hook in this mode to cancel the ping worker during system sleep and restore it on resume. Leave action=0 unchanged: its WS0 heartbeat workaround needs separate resume-time accounting before its core worker can be quiesced. Fixes: 280db0e ("NVIDIA: SAUCE: watchdog: sbsa_gwdt: park the watchdog around system sleep on MediaTek implementations") Signed-off-by: Bharat Dintakurti <bdintakurti@nvidia.com>
8e68285 to
011bf55
Compare
|
|
|
|
|
Merged, closing PR. |
On MediaTek SBSA watchdogs in action=1 mode, the sleep notifier parks the hardware during system sleep, but the watchdog-core keepalive timer can remain armed. Its SYS_TIMER interrupt can wake MT8901 from S3 even though the hardware watchdog is parked.
This change opts only that mode into the existing watchdog-core suspend hook, canceling the ping timer and work at PM prepare and restoring the worker on resume. action=0 remains unchanged because its WS0 heartbeat workaround needs separate resume-time accounting. The watchdog core's existing prepare-to-freeze rearm window is outside this PR's scope.
Validation: On MT8901 with action=1, early_enable=1, and a 10-second timeout, three 60-second deep S3 cycles with TAD wake resumed without an early SYS_TIMER wake or watchdog reset. The boot ID was unchanged.
Follow-up to #628.
bos twin of #632.
BugLink: https://bugs.launchpad.net/bugs/2169002