diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-01-22 14:22:38 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-01-26 21:38:36 +0300 |
commit | 86686b8f7ad3abe5aca17643efcee2bbce31a8f7 (patch) | |
tree | 7feda8e38675c730ae240e35eb747849ed159332 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | b017500ab53c06441ff7d3a681484e37039b4f57 (diff) | |
download | linux-86686b8f7ad3abe5aca17643efcee2bbce31a8f7.tar.xz |
PM: sleep: Simplify dpm_suspended_list walk in dpm_resume()
Notice that devices can be moved to dpm_prepared_list before running
their resume callbacks, in analogy with dpm_noirq_resume_devices() and
dpm_resume_early(), because doing so will not affect the final ordering
of that list.
Namely, if a device is the first dpm_suspended_list entry while
dpm_list_mtx is held, it has not been removed so far and it cannot be
removed until dpm_list_mtx is released, so moving it to dpm_prepared_list
at that point is valid. If it is removed later, while its resume
callback is running, it will be deleted from dpm_prepared_list without
changing the ordering of the other devices in that list.
Accordingly, rearrange the while () loop in dpm_resume() to move
devices to dpm_prepared_list before running their resume callbacks and
implify the locking and device reference counting in it.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions