thermal: Rework binding cooling devices to trip points
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest14 patches 51 repliesIn review
- v217 patches 5 repliesSuperseded
- v117 patches 9 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | thermal: core: Fold two functions into their respective callersdrivers/ | +19 | 2 replies | |
| 2/14 | thermal: core: Rearrange checks in thermal_bind_cdev_to_trip()drivers/ | +4 | 9 replies | |
| 3/14 | thermal: core: Drop redundant thermal instance checksdrivers/ | +2 | 5 replies | |
| 4/14 | thermal: sysfs: Use the dev argument in instance-related show/storedrivers/ | +7 | 3 replies | |
| 5/14 | thermal: core: Move thermal zone locking out of bind/unbind functionsdrivers/ drivers/ | +23 | 6 replies | |
| 6/14 | thermal: core: Introduce .should_bind() thermal zone callbackdrivers/ include/ | +92 | 3 replies | |
| 7/14 | thermal: ACPI: Use the .should_bind() thermal zone callbackdrivers/ | +9 | 2 replies | |
| 8/14 | thermal: core: Unexport thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()drivers/ include/ | +4 | 3 replies | |
| 9/14 | platform/x86: acerhdf: Use the .should_bind() thermal zone callbackdrivers/ | +6 | 2 replies | |
| 10/14 | mlxsw: core_thermal: Use the .should_bind() thermal zone callbackdrivers/ | +31 | 0 replies | |
| 11/14 | thermal: imx: Use the .should_bind() thermal zone callbackdrivers/ | +6 | 1 reply | |
| 12/14 | thermal/of: Use the .should_bind() thermal zone callbackdrivers/ | +41 | 5 replies | |
| 13/14 | thermal: core: Drop unused bind/unbind functions and callbacksDocumentation/ drivers/ include/ | +6 | 3 replies | |
| 14/14 | thermal: core: Clean up trip bind/unbind functionsdrivers/ | +21 | 4 replies |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Ido Schimmel | Hans de Goede | Peter Kästle | Zhang Rui | Huisong Li | Daniel Lezcano |
|---|---|---|---|---|---|---|
| 1/14 | R-b | R-b | ||||
| 2/14 | R-b | R-b | ||||
| 3/14 | R-b | R-b | ||||
| 4/14 | R-b | A-b | R-b | |||
| 5/14 | R-b | R-b | ||||
| 6/14 | R-b | A-b | R-b | |||
| 7/14 | R-b | R-b | ||||
| 8/14 | R-b | A-b | R-b | |||
| 9/14 | A-b | T-b | R-b | |||
| 10/14 | R-b | |||||
| 11/14 | R-b | |||||
| 12/14 | R-b T-b | |||||
| 13/14 | R-b | A-b | R-b | |||
| 14/14 | R-b | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH v3 00/14] thermal: Rework binding cooling devices to trip points
Hi Everyone,
This is one more update of
https://lore.kernel.org/linux-pm/[email protected]/#r
the cover letter of which was sent separately by mistake:
https://lore.kernel.org/linux-pm/CAJZ5v0jo5vh2uD5t4GqBnN0qukMBG_ty33PB=NiEqigqxzBcsw@mail.gmail.com/
and it has been updated once already:
https://lore.kernel.org/linux-pm/[email protected]/
Relative to the v2 above it drops 3 patches, one because it was broken ([04/17 in the v2), and two more that would need to be rebased significantly, either because of dropping the other broken patch or because of the recent Bang-bang governor fixes:
https://lore.kernel.org/linux-pm/[email protected]/
The remaining 14 patches, 2 of which have been slightly rebased and the rest is mostly unchanged (except for some very minor subject and changelog fixes), is not expected to be controversial and are targeting 6.12, on top of the current linux-next material.
The original motivation for this series quoted below has not changed:
The code for binding cooling devices to trip points (and unbinding them from trip point) is one of the murkiest pieces of the thermal subsystem. It is convoluted, bloated with unnecessary code doing questionable things, and it works backwards.
The idea is to bind cooling devices to trip points in accordance with some information known to the thermal zone owner (thermal driver). This information is not known to the thermal core when the thermal zone is registered, so the driver needs to be involved, but instead of just asking the driver whether or not the given cooling device should be bound to a given trip point, the thermal core expects the driver to carry out all of the binding process including calling functions specifically provided by the core for this purpose which is cumbersome and counter-intuitive.
Because the driver has no information regarding the representation of the trip points at the core level, it is forced to walk them (and it has to avoid some locking traps while doing this), or it needs to make questionable assumptions regarding the ordering of the trips in the core. There are drivers doing both these things.
The first 5 patches in the series are preliminary.
Patch [06/14] introduces a new .should_bind() callback for thermal zones and patches [07,09-12/14] modifies drivers to use it instead of the .bind() and .unbind() callbacks which allows them to be simplified quite a bit.
The other patches [08,13-14/14] get rid of code that becomes unused after the previous changes and do some cleanups on top of that.
The entire series along with 2 patches on top of it (that were present in the v2 of this set of patches) is available in the thermal-core-testing git branch:
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/log/?h=thermal-core-testing
(note that this branch is going to be rebased shortly on top of 6.11-rc4 and the thermal control material in linux-next).
Thanks!