Skip to content

watchdog: apple: set the parent device and honour nowayout - #951

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
astaff:watchdog/apple-parent-nowayout
Nov 5, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
astaff:watchdog/apple-parent-nowayout

Conversation

@astaff

@astaff astaff commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Why

Split from #525: this applies to every Apple SoC using the driver. A kernel built with CONFIG_WATCHDOG_NOWAYOUT still lets userspace stop the watchdog, and with no parent device the class device has no device link and a watchdog alias is ignored.

What

  • Apply the Kconfig nowayout setting.
  • Set wdd.parent to the platform device.

Testing

Kernel is the same merge as #525's proof, built with CONFIG_WATCHDOG_NOWAYOUT=y, on a J616c: nowayout reads 1 and systemd uses /dev/watchdog0. On an earlier merge, with the same watchdog code, the class device resolved to the apple-watchdog platform device. Not tested on another Apple SoC.

🤖 Generated with Claude Code

The driver never applies the nowayout policy, so a kernel built with
CONFIG_WATCHDOG_NOWAYOUT still lets userspace stop the watchdog with a
magic close or WDIOS_DISABLECARD. Apply the Kconfig setting.

wdd.parent is also unset, so the watchdog class device has no "device"
link in sysfs, a "watchdog" device tree alias on the node is ignored,
and the core logs the identity string instead of the device name. Set
it to the platform device.

This applies to every Apple SoC using the driver. Nothing changes in a
kernel built without CONFIG_WATCHDOG_NOWAYOUT beyond the sysfs link and
the log prefix.

Assisted-by: LLM
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out, no more module parameter and it does the right thing.

We tested it in the merge train, integration/aurora 1d76233 plus this PR and 525, 732, 749, 920 and 950, on our M4 Pro (J616s) as a one-shot boot with SELinux enforcing. The watchdog class device now links to 50836c000.watchdog. nowayout reads 0 there because our universal config leaves CONFIG_WATCHDOG_NOWAYOUT off, so nothing changes for systemd on our machines. Boot row same as fleet16, no new AVCs, no failed units. Merging!

@RyanTheTide
RyanTheTide merged commit 643f7f6 into aurora-silicon:integration/aurora Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants