diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-10-04 22:23:10 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-10-22 13:07:15 +0300 |
commit | d07700b474d38ea4b1130e37d28379fc202054fa (patch) | |
tree | 4313da14e6a396df98e1d014ac451a37d3e9610f /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | cdf771ab476bd9acb0948f3088a277d5c3cacc6b (diff) | |
download | linux-d07700b474d38ea4b1130e37d28379fc202054fa.tar.xz |
thermal: core: Consolidate thermal zone locking during initialization
The part of thermal zone initialization carried out under
thermal_list_lock acquires the thermal zone lock and releases it
multiple times back and forth which is not really necessary.
Instead of doing this, make it acquire the thermal zone lock once after
acquiring thermal_list_lock and release it along with that lock.
For this purpose, move all of the code in question to
thermal_zone_init_complete() introduced previously and provide an
"unlocked" variant of thermal_zone_cdev_bind() to be invoked from
there.
Also notice that a thermal zone does not need to be added to
thermal_tz_list under its own lock, so make the new code acquire
the thermal zone lock after adding it to the list.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/1920382.CQOukoFCf9@rjwysocki.net
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
[ rjw: Rebase on top of recent thermal core changes ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions