Re: [PATCH v2 2/3] docs: watchdog: npcm: Add reset status description
| Newsgroups | org.kernel.vger.linux-watchdog,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] UAPI Semantic Violation: Overloading generic watchdog bootstatus flags with unrelated platform-specific reset causes. -- commit 622b044102abac9e6e33a21b4739ad90ba16eec5 Author: Tomer Maimon <[email protected]> docs: watchdog: npcm: Add reset status description This commit adds documentation describing how the NPCM watchdog driver reports reset causes through bootstatus on NPCM750 and NPCM845 systems. It documents the fixed reset flag mapping, watchdog instance mapping, and sysfs reporting behavior. > diff --git a/Documentation/watchdog/npcm_wdt.rst b/Documentation/watchdog/npcm_wdt.rst > new file mode 100644 > index 0000000000000..48f0c7920c112 > --- /dev/null > +++ b/Documentation/watchdog/npcm_wdt.rst [ ... ] > +.. list-table:: Reset-cause mapping > + :header-rows: 1 > + > + * - Platform > + - Reset indication > + - Bootstatus flag > + - Reported meaning > + * - NPCM750 and NPCM845 > + - ``PORST`` > + - ``WDIOF_OVERHEAT`` > + - power-on reset > + * - NPCM750 and NPCM845 > + - ``CORST`` > + - ``WDIOF_FANFAULT`` > + - core reset [Severity: High] Is it intentional to overload standard watchdog UAPI flags with unrelated platform-specific reset causes? Mapping "power-on reset" (NPCM_PORST) to WDIOF_OVERHEAT ("Reset due to CPU overheat") and "core reset" (NPCM_CORST) to WDIOF_FANFAULT ("Fan failed") will cause generic userspace applications, system managers, and monitoring tools to misinterpret the values. This could lead to false reports of CPU overheating or fan failures during normal cold boots. Should these hardware-specific reset reasons be exposed via a dedicated reset-reason framework or custom sysfs attributes instead of redefining standardized generic UAPI flags? -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2