Skip to content

thermal: ACPI: More ACPI thermal improvements and modification of thermal instances

Rafael J. Wysocki linux-acpi linux-pm lkml 1 version In review

Get series with b4
b4 am 1957441.PYKUYFuaPT@kreacher

Versions newest first

  1. v1 Latest13 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13ACPI: thermal: Add device list to struct acpi_thermal_tripdrivers/acpi/thermal.c+21 -151 reply
2/13ACPI: thermal: Collapse trip devices update functionsdrivers/acpi/thermal.c+20 -335 replies
3/13ACPI: thermal: Collapse trip devices update function wrappersdrivers/acpi/thermal.c+7 -191 reply
4/13ACPI: thermal: Merge trip initialization functionsdrivers/acpi/thermal.c+30 -341 reply
5/13thermal: core: Store trip pointer in struct thermal_instancedrivers/thermal/gov_bang_bang.c drivers/thermal/gov_fair_share.c drivers/thermal/gov_power_allocator.c +6 more+60 -371 reply
6/13thermal: gov_fair_share: Rearrange get_trip_level()drivers/thermal/gov_fair_share.c+10 -124 replies
7/13thermal: gov_power_allocator: Use trip pointers instead of trip indicesdrivers/thermal/gov_power_allocator.c+38 -644 replies
8/13thermal: gov_step_wise: Fold update_passive_instance() into its callerdrivers/thermal/gov_step_wise.c+10 -180 replies
9/13thermal: core: Rename trip point index function arguments in governorsdrivers/thermal/gov_bang_bang.c drivers/thermal/gov_step_wise.c drivers/thermal/gov_user_space.c +1 more+14 -140 replies
10/13thermal: core: Allow trip pointers to be used for cooling device bindingdrivers/thermal/thermal_core.c include/linux/thermal.h+42 -203 replies
11/13ACPI: thermal: Do not use trip indices for cooling device bindingdrivers/acpi/thermal.c+46 -681 reply
12/13ACPI: thermal: Drop critical_valid and hot_valid trip flagsdrivers/acpi/thermal.c+8 -171 reply
13/13ACPI: thermal: Rename structure fields holding temperature in deci-Kelvindrivers/acpi/thermal.c+22 -221 reply

Reviews trailers per patch

9 of 13 patches have a Reviewed-by or Acked-by.

PatchDaniel Lezcano
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13
7/13
8/13
9/13
10/13R-b
11/13R-b
12/13R-b
13/13A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 00/13] thermal: ACPI: More ACPI thermal improvements and modification of thermal instances

Hi All,

The ACPI thermal driver has undergone some significant changes recently, but there is still room for improvements in it.

First off, it turns out that a small rearrangement of its internal data structures allows code duplication in it to be reduced quite a bit (patches [01-04/13].

Next, by changing the way it binds cooling devices to thermal zones (and trips within them), the use of trip point indices can be eliminated from it (patch [11/13]) which then allows its internal data structures to be simplified even further (patch [12/13]).

However, in order to make those latter changes, it is useful to modify struct thermal_instance to carry a trip pointer instead a trip index (patch [05/13]) which then allows the core to be adjusted to facilitate using trip pointers for cooling device binding and unbinding (patch [10/13]).

Meanwhile, the modification of struct thermal_instance mentioned above also helps to reduce the thermal governors overhead related to using __thermal_zone_get_trip() that carries out bounds checking and copies trip point data which both are not necessary in the governor code. Some related cleanups of thermal governors can be done as well (patches [06-09/13].

Finally, it is prudent to visually distinguish the names of structure fields and variables that carry temperature values in different units, so patch [13/13] changes the names of those items in the ACPI thermal driver that are used to store temperature values in deci-Kelvin.

This series is on top of the series of ACPI thermal driver posted last week:

https://patchwork.kernel.org/project/linux-acpi/list/?series=783543

and a couple of recent thermal core patches:

https://patchwork.kernel.org/project/linux-pm/patch/12296181.O9o76ZdvQC@kreacher/
https://patchwork.kernel.org/project/linux-pm/patch/5981326.lOV4Wx5bFT@kreacher/

It will be exposed in a separate git branch for easier access.

Please see the individual patch changelogs for details.

Thanks!