summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorzoan37 <agentzoan@gmail.com>2026-10-10 21:36:31 -0400
committerGuenter Roeck <linux@roeck-us.net>2026-11-08 17:45:19 -0800
commitea9514f06a4a6c6df462da78cda9ff283a8b564f (patch)
tree05a4680eff1c0834c09e0fd516d8bd5416f7fd04 /tools/perf/scripts/python
parentc07bf0b4797407ce142c84315df73b7fcd4f1f04 (diff)
watchdog: mtk_wdt: Stop a running watchdog over system sleep even if not opened
mtk_wdt_suspend() and mtk_wdt_resume() only stop and restart the watchdog when it is active, that is, when userspace has opened it. But a watchdog that the bootloader left enabled stays enabled at probe, marked WDOG_HW_RUNNING, and the watchdog core pings it until userspace takes over; that has been the case since commit bbece05c0d3a ("watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze and it doesn't reboot by watchdog problem"). If the system suspends before userspace opens the device, or userspace never does, nothing stops the watchdog and nothing pings it while the system sleeps, so it resets the system one timeout (31 s by default) into the sleep. Also stop it on suspend and restart it on resume when it is running in hardware, like sp805_wdt does. The watchdog core keeps pinging such a watchdog until mtk_wdt_suspend() stops it, so it stays fed while tasks are frozen before the devices suspend. It may also ping once after resume, before mtk_wdt_resume() has started the watchdog again; that only reloads the counter of a stopped watchdog, and the watchdog stays powered over system sleep (it is what resets the system from s2idle without this patch). watchdog_stop_ping_on_suspend() is deliberately not used: it stops the pings from PM_SUSPEND_PREPARE on, which would leave a running watchdog unfed while tasks are frozen and could reset the system there with a short timeout. Fixes: bbece05c0d3a ("watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze and it doesn't reboot by watchdog problem") Signed-off-by: zoan37 <agentzoan@gmail.com> Link: https://patch.msgid.link/20261011013631.1149228-1-agentzoan@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions