Skip to content

thermal: core: Fixes and cleanups, mostly related to thermal zone init and exit

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest12 patches 16 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12thermal: core: Initialize thermal zones before registering themdrivers/thermal/thermal_core.c+1 -11 reply
2/12thermal: core: Rearrange PM notification codedrivers/thermal/thermal_core.c+46 -421 reply
3/12thermal: core: Represent suspend-related thermal zone flags as bitsdrivers/thermal/thermal_core.c drivers/thermal/thermal_core.h+12 -101 reply
4/12thermal: core: Mark thermal zones as initializing to start withdrivers/thermal/thermal_core.c drivers/thermal/thermal_core.h+14 -31 reply
5/12thermal: core: Fix race between zone registration and system suspenddrivers/thermal/thermal_core.c+16 -21 reply
6/12thermal: core: Consolidate thermal zone locking during initializationdrivers/thermal/thermal_core.c+22 -171 reply
7/12thermal: core: Mark thermal zones as exiting before unregistrationdrivers/thermal/thermal_core.c drivers/thermal/thermal_core.h+4 -01 reply
8/12thermal: core: Consolidate thermal zone locking in the exit pathdrivers/thermal/thermal_core.c+39 -271 reply
9/12thermal: core: Update thermal zones after cooling device bindingdrivers/thermal/thermal_core.c+13 -101 reply
10/12thermal: core: Drop need_update field from struct thermal_zone_devicedrivers/thermal/thermal_core.c drivers/thermal/thermal_core.h+0 -61 reply
11/12thermal: core: Move lists of thermal instances to trip descriptorsdrivers/thermal/gov_bang_bang.c drivers/thermal/gov_fair_share.c drivers/thermal/gov_power_allocator.c +4 more+62 -641 reply
12/12thermal: core: Pass trip descriptors to trip bind/unbind functionsdrivers/thermal/thermal_core.c+12 -151 reply

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchLukasz Luba
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

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

Read the v2 thread

Cover letter [PATCH v2 00/12] thermal: core: Fixes and cleanups, mostly related to thermal zone init and exit

Hi Everyone,

After posting the two series of thermal core patches for 6.13:

https://lore.kernel.org/linux-pm/[email protected]/

and

https://lore.kernel.org/linux-pm/[email protected]/

before the 6.12 merge window, I have decided to reorder the changes included in these series, so that fixes and more significant cleanups (for example, changing they layout of data structures) go first, followed by the changes related to using guards for locking, and the optimization involving sorted lists becomes the last piece.

This series is the first part and the majority of patches in it come from the second (RFC) series mentioned above. Of course, they needed to be rebased to be applied in the new order. It is on top of 6.12-rc1 with

https://lore.kernel.org/linux-pm/[email protected]/

applied and it will be added to my thermal-core-testing branch. It is in v2 to start with because all of the patches in it have already been posted in some form.

The first 10 patches fix some potential issues related to thermal zone initialization and exit (for example, user space may start to interact with a thermal zone during its initialization before it's ready and system suspend taking place at a wrong time may skip a new thermal zone so it is not suspended) and do some cleanups related to that. This concludes with the removal of the need_update field from struct thermal_zone_device.

The last two patches move lists of thermal instances from thermal zones to trip point descriptors and clean up some code on top of that.

Please refer to the individual patch changelogs for details.

Thanks!