diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-06-14 18:22:25 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-06-14 18:36:59 +0300 |
commit | d2278f3533a8c4933c52f85784ffa73e8250c524 (patch) | |
tree | 3c0910d6d7e456b8d068ee60fe6e8769bb5217a1 /scripts/gdb/linux/modules.py | |
parent | 83a7eefedc9b56fe7bfeff13b6c7356688ffa670 (diff) | |
download | linux-d2278f3533a8c4933c52f85784ffa73e8250c524.tar.xz |
thermal: core: Synchronize suspend-prepare and post-suspend actions
After commit 5a5efdaffda5 ("thermal: core: Resume thermal zones
asynchronously") it is theoretically possible that, if a system suspend
starts immediately after a system resume, thermal_zone_device_resume()
spawned by the thermal PM notifier for one of the thermal zones at the
end of the system resume will run after the PM thermal notifier for the
suspend-prepare action. If that happens, tz->suspended set by the latter
will be reset by the former which may lead to unexpected consequences.
To avoid that race, synchronize thermal_zone_device_resume() with the
suspend-prepare thermal PM notifier with the help of additional bool
field and completion in struct thermal_zone_device.
Note that this also ensures running __thermal_zone_device_update() at
least once for each thermal zone between system resume and the following
system suspend in case it is needed to start thermal mitigation.
Fixes: 5a5efdaffda5 ("thermal: core: Resume thermal zones asynchronously")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions