]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: sleep: Update power.smart_suspend under PM spinlock
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Feb 2025 10:45:52 +0000 (11:45 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Mar 2025 13:35:07 +0000 (14:35 +0100)
commitcb88c229fe77ea16cef2b9c8154cf44d331818a6
tree30d4e0b4a1dd72dce76a811edfd2ca3a3b83266f
parenteeb87d17aceab7803a5a5bcb6cf2817b745157cf
PM: sleep: Update power.smart_suspend under PM spinlock

Put the update of the power.smart_suspend device flag under the PM
spinlock of the device in case multiple bit fields in struct dev_pm_info
occupy one memory location which needs to be updated via RMW every time
any of these bit fields is updated.

The lock in question is already held around the power.direct_complete
flag update in device_prepare() for the same reason, so this change does
not add locking-related overhead to the code.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/2368159.ElGaqSPkdT@rjwysocki.net
drivers/base/power/main.c