]> git.hungrycats.org Git - linux/commit
PM: dpm_watchdog: Add sysctl interface for DPM watchdog timeouts
authorTzung-Bi Shih <tzungbi@kernel.org>
Mon, 8 Jun 2026 02:15:26 +0000 (02:15 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 11 Jun 2026 19:38:29 +0000 (21:38 +0200)
commit3edbf62df6c236ef51e9d733e3f6bd6d70ee59af
tree0e03896935a1e5d3e3a9894d0a8203e58ee37a53
parent3da1dbf936d2fb25ef9925550bb276861d803e57
PM: dpm_watchdog: Add sysctl interface for DPM watchdog timeouts

Introduce sysctl knobs to allow configuring DPM watchdog timeouts at
runtime.

Currently, these timeouts are fixed at compile time via
CONFIG_DPM_WATCHDOG_TIMEOUT and CONFIG_DPM_WATCHDOG_WARNING_TIMEOUT.
This limits flexibility if the timeouts need to be adjusted for
different testing scenarios or hardware behaviors without rebuilding
the kernel.

Add the following sysctl files under /proc/sys/kernel/:

 - dpm_watchdog_timeout_secs: The total timeout before panic. The
   maximum value is capped at CONFIG_DPM_WATCHDOG_TIMEOUT to prevent
   unreasonably large timeouts.

 - dpm_watchdog_warning_timeout_secs: The warning timeout. The maximum
   value is capped at the current dpm_watchdog_timeout_secs.

Both sysctls have a minimum value of 1.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260608021526.1023248-4-tzungbi@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/main.c