]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: Block enabling of runtime PM during system suspend
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Feb 2025 20:11:42 +0000 (21:11 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Feb 2025 20:43:06 +0000 (21:43 +0100)
commit3e5eee147b7b0f5a93f56beffe34e81fdd00fa0d
treec96640185cb1262bba5874f5f0e0cc5920074f48
parent6146b949946d969bac728e08d258ca04fee4ae9f
PM: Block enabling of runtime PM during system suspend

If device_prepare() runs on a device that has never had runtime
PM enabled so far, it may reasonably assume that runtime PM will
not be enabled for that device during the system suspend-resume
cycle currently in progress, but this has never been guaranteed.

To verify this assumption, make device_prepare() arrange for
triggering a device warning accompanied by a call trace dump if
runtime PM is enabled for such a device after it has returned.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/6131109.lOV4Wx5bFT@rjwysocki.net
drivers/base/power/main.c
drivers/base/power/runtime.c
include/linux/pm.h
include/linux/pm_runtime.h