Skip to content

[26.04_linux-nvidia] watchdog: sbsa_gwdt: add early_enable module parameter - #557

Open
kbutala-nv wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
kbutala-nv:sbsa-watchdog
Open

[26.04_linux-nvidia] watchdog: sbsa_gwdt: add early_enable module parameter#557
kbutala-nv wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
kbutala-nv:sbsa-watchdog

Conversation

@kbutala-nv

Copy link
Copy Markdown

This PR contains backport of change https://patch.msgid.link/[email protected]

We need this patch to support newer firmware revisions.

(backported from commit 11f93e639d51 groeck/linux-staging.git)

@kbutala-nv kbutala-nv changed the title [26.04_linux-nvidia-bos] NVIDIA: SAUCE: watchdog: sbsa_gwdt: add early_enable module parameter [26.04_linux-nvidia] NVIDIA: SAUCE: watchdog: sbsa_gwdt: add early_enable module parameter Sep 1, 2026
@nirmoy nirmoy added the help wanted Extra attention is needed label Sep 1, 2026
@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Warning

⚠️ Review needs attention

The new early_enable path can start a disabled SBSA watchdog without kernel keepalives when boot-enabled handling is off, risking a reset before userspace opens /dev/watchdog.

Findings: Critical 0 · High 0 · Medium 1 · Low 0

🔍 Review artifacts

📦 Kernel deb builds — 🟢 2/2 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

Review metadata
  • Reviewed head: 93bda09ac4ae
  • Overall status: attention needed
  • Architectures: 2/2 successful

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 93bda09ac4ae │ [SAUCE] watchdog: sbsa_gwdt: add early_enable module parameter   │ N/A        │ N/A     │ wang, linux, kbutala      │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint results:
E: 93bda09ac4ae ("watchdog: sbsa_gwdt: add early_enable module param"): not SAUCE/UBUNTU/Revert but has no upstream reference trailer (cherry picked from commit ... or backported from ...)

PR metadata:
E: PR targets 26.04_linux-nvidia but body has no https://bugs.launchpad.net/... link

@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

@kbutala-nv LGTM

The commit is merged in watchdog-next so "NVIDIA: SAUCE" is not needed.

@kbutala-nv

Copy link
Copy Markdown
Author

@kbutala-nv LGTM

The commit is merged in watchdog-next so "NVIDIA: SAUCE" is not needed.

Ack! I thought the linter is failing because of that. Should I remove it from PR description or commit message (or both)?

@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Yes, ignore the linter error for this. I will try to improve it.

On SBSA platforms using standard UEFI firmware (such as EDK II), the
watchdog timer is often enabled during early boot stages but explicitly
disabled by the firmware before handing over control to the OS (e.g.,
during ExitBootServices). This is done to prevent unintended resets
while the OS is loading, assuming the OS watchdog driver will take over.

However, this leaves a protection gap. If the system hangs between the
firmware handover and the userspace watchdog daemon startup, the hardware
watchdog will not fire to recover the system. For safety-critical systems
that require continuous hardware watchdog protection from the earliest
possible moment, this gap is problematic.

Add an 'early_enable' module parameter to allow the kernel driver to
re-enable the watchdog immediately during probe if it was left disabled
by the firmware. By setting the WDOG_HW_RUNNING status bit, the watchdog
core is instructed that the hardware is active. As a result, the core's
pre-userspace handler (controlled by 'handle_boot_enabled') will
automatically issue periodic keepalives until userspace opens the device.

This bridges the protection gap seamlessly without requiring firmware
modifications and without risking unintended resets during kernel boot.

The parameter defaults to false to preserve the traditional behavior.

Signed-off-by: Zexin Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
(backported from commit 11f93e639d51 groeck/linux-staging.git)
Signed-off-by: Kaushal Rajeev Butala <[email protected]>
@kbutala-nv kbutala-nv changed the title [26.04_linux-nvidia] NVIDIA: SAUCE: watchdog: sbsa_gwdt: add early_enable module parameter [26.04_linux-nvidia] watchdog: sbsa_gwdt: add early_enable module parameter Sep 1, 2026
@kbutala-nv

Copy link
Copy Markdown
Author

Yes, ignore the linter error for this. I will try to improve it.

removed "NVIDIA: SAUCE:" from PR description and commit message.

@nirmoy

nirmoy commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

@kbutala-nv just one little thing:
I could cherry-pick it without any conflict so let's git cherry-pick -xs 11f93e639d513cbfaa78237cd163039d27fea33c
which will give

    (cherry picked from commit 11f93e639d513cbfaa78237cd163039d27fea33c from groeck/linux-staging.git)

from groeck/linux-staging.git added after the git cherry-pick -xs

@nvmochs

nvmochs commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

@kbutala-nv just one little thing: I could cherry-pick it without any conflict so let's git cherry-pick -xs 11f93e639d513cbfaa78237cd163039d27fea33c which will give

    (cherry picked from commit 11f93e639d513cbfaa78237cd163039d27fea33c from groeck/linux-staging.git)

from groeck/linux-staging.git added after the git cherry-pick -xs

@kbutala-nv
I agree this should be picked with -xs.

Instead of appending "from groeck/linux-staging.git", just use "linux-next" since this patch is now in linux-next (same SHA).

e.g. once picked it should look like:

(cherry picked from commit 11f93e639d513cbfaa78237cd163039d27fea33c linux-next)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants