drivers/watchdog: fix capture automonitor notifier context#19433
drivers/watchdog: fix capture automonitor notifier context#19433Zepp-Hanzj wants to merge 2 commits into
Conversation
|
ffd7875 to
5c1719b
Compare
5c1719b to
2f117b0
Compare
|
Thanks for the review. I updated the branch:
The companion apps branch was also updated with nxstyle/cmake-format fixes and Signed-off-by trailers. |
2f117b0 to
5c56366
Compare
but the change breaks the system which may have more than one watchdog hardware |
5c56366 to
1ab7e2f
Compare
|
The multi-watchdog issue has been addressed in the latest commit Changes:
The commit also includes a complete commit body, |
1ab7e2f to
575fe70
Compare
|
Addressed the latest review comments in commit 575fe70:
The simulator build completes successfully and |
575fe70 to
090605a
Compare
|
The failed Build run was caused by the new I regenerated the defconfig with |
Provide per-instance capture automonitor lookup for watchdog lower halves that pass callback context, and avoid selecting an unrelated watchdog when legacy lower halves provide no context. Update STM32 WWDG lower halves to pass their instance context so multiple watchdog devices remain distinguishable. Signed-off-by: hanzhijian <hanzhijian@zepp.com> Assisted-by: OpenAI Codex
090605a to
c9701dc
Compare
Explain how drivertest applications are selected and run, list the current test categories, and document the watchdog reset and notifier test behavior. Assisted-by: OpenAI Codex Signed-off-by: hanzhijian <hanzhijian@zepp.com>
Summary
Fix watchdog capture-based automonitor handling for lower-half drivers that invoke the capture callback with a
NULLargument, and make timeout notifier delivery match the documented automonitor contract.Changes
watchdog_automonitor_timeout()from the capture interrupt path when timeout notifiers are enabled.WATCHDOG_NOTIFIER_ACTIONwithdata == NULL.cmocka_driver_watchdog.Design limitation
The fallback context is required only for lower-halves that call the capture handler with
arg == NULL. Such a lower-half can support at most one active capture automonitor instance. Lower-halves that provide a per-instance callback argument remain instance-safe. This limitation is documented in the source and validation report; supporting multiple NULL-context lower-halves would require an instance-level callback/context interface in each affected lower-half.Validation
Simulator
NULLdata.Observed cmocka result:
STM32F407 hardware
WDIOC_STOPlimitation recorded: STM32 WWDG cannot be stopped after it has been started, so a stop-race test cannot use the hardware stop ioctl as a success criterion.Evidence
Relationship to nuttx-apps
The companion test-only change is submitted separately in
nuttx-appsasfix/watchdog-notifier-tests. Merge this core PR before enabling the companion test configuration.Checklist
git diff --checkpasses.