Skip to content

thermal: cpu_cooling: Fixes and cleanups

Viresh Kumar linux-arm-kernel linux-devicetree linux-pm linux-samsung-soc lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest26 patches 8 repliesIn review
  2. v126 patches 28 repliesSuperseded

Changes in v2 from the cover letter

- Dropped: cpu_cooling: Drop useless locking around idr_alloc/idr_remove
- Fixed $Subject of patches to prefix with: "thermal: " before "cpu_cooling:"
- Fixed some stupid mistakes highlighted by Eduardo and Javi.
- s/ERR_PTR(cpufreq_dev->id)/ERR_PTR(ret)
- s/sizeof(*cool_dev)/sizeof(*cpufreq_dev)

- Rebased over rc7 and that changed lots of things.
- list of cooling devices was already present in rc7, so my patch to do the same is gone.
- Other modifications done as well to fit with latest updates.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26thermal: cpu_cooling: check for the readiness of cpufreq layerdrivers/thermal/cpu_cooling.c drivers/thermal/db8500_cpufreq_cooling.c drivers/thermal/imx_thermal.c +3 more+14 -201 reply
2/26thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register()drivers/thermal/db8500_cpufreq_cooling.c+1 -41 reply
3/26thermal: imx: pass cpu_present_mask to cpufreq_cooling_register()drivers/thermal/imx_thermal.c+1 -30 replies
4/26thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register()drivers/thermal/samsung/exynos_thermal_common.c+1 -30 replies
5/26thermal: cpu_cooling: random comment fixupsdrivers/thermal/cpu_cooling.c+3 -20 replies
6/26thermal: cpu_cooling: fix doc comment over struct cpufreq_cooling_devicedrivers/thermal/cpu_cooling.c+2 -32 replies
7/26thermal: cpu_cooling: Add comment to clarify relation between cooling state and frequencydrivers/thermal/cpu_cooling.c+14 -00 replies
8/26thermal: cpu_cooling: Pass variable instead of its type to sizeof()drivers/thermal/cpu_cooling.c+1 -20 replies
9/26thermal: cpu_cooling: no need to set cpufreq_state to zerodrivers/thermal/cpu_cooling.c+1 -10 replies
10/26thermal: cpu_cooling: no need to set cpufreq_dev to NULLdrivers/thermal/cpu_cooling.c+1 -10 replies
11/26thermal: cpu_cooling: no need to initialze 'ret'drivers/thermal/cpu_cooling.c+1 -10 replies
12/26thermal: cpu_cooling: propagate error returned by idr_alloc()drivers/thermal/cpu_cooling.c+1 -10 replies
13/26thermal: cpu_cooling: Don't match min/max frequencies for all CPUs on cooling registerdrivers/thermal/cpu_cooling.c+2 -170 replies
14/26thermal: cpu_cooling: don't iterate over all allowed_cpus to update cpufreq policydrivers/thermal/cpu_cooling.c+3 -60 replies
15/26thermal: cpu_cooling: Don't check is_cpufreq_valid()drivers/thermal/cpu_cooling.c+1 -190 replies
16/26thermal: cpu_cooling: do error handling at the bottom in __cpufreq_cooling_register()drivers/thermal/cpu_cooling.c+12 -70 replies
17/26thermal: cpu_cooling: initialize 'cpufreq_val' on registrationdrivers/thermal/cpu_cooling.c+7 -50 replies
18/26thermal: cpu_cooling: Merge cpufreq_apply_cooling() into cpufreq_set_cur_state()drivers/thermal/cpu_cooling.c+16 -360 replies
19/26thermal: cpu_cooling: remove unnecessary wrapper get_cpu_frequency()drivers/thermal/cpu_cooling.c+9 -310 replies
20/26thermal: cpu_cooling: find max level during device registrationdrivers/thermal/cpu_cooling.c+15 -130 replies
21/26thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL anymoredrivers/thermal/cpu_cooling.c+3 -110 replies
22/26thermal: cpu_cooling: use cpufreq_dev_list instead of cpufreq_dev_countdrivers/thermal/cpu_cooling.c+2 -60 replies
23/26thermal: cpu_cooling: Pass 'cpufreq_dev' to get_property()drivers/thermal/cpu_cooling.c+27 -230 replies
24/26thermal: cpu_cooling: Store frequencies in descending orderdrivers/thermal/cpu_cooling.c+40 -10 replies
25/26thermal: cpu_cooling: Use cpufreq_dev->freq_table for finding level/freqdrivers/thermal/cpu_cooling.c+19 -892 replies
26/26thermal: cpu_cooling: update copyright tagsdrivers/thermal/cpu_cooling.c+2 -00 replies

Reviews trailers per patch

4 of 26 patches have a Reviewed-by or Acked-by.

PatchViresh KumarEduardo ValentinJavi MerinoLinus Walleij
1/26A-b
2/26A-b
3/26
4/26
5/26A-b
6/26
7/26
8/26
9/26
10/26
11/26
12/26
13/26
14/26
15/26
16/26A-b
17/26
18/26
19/26
20/26
21/26
22/26
23/26
24/26
25/26
26/26

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH V2 00/26] thermal: cpu_cooling: Fixes and cleanups

Hi Eduardo,

Here is the second iteration of my cpu_cooling cleanups to make it work/look better. As discussed earlier I picked one of your patches as mine were dependent on it. Have done some fixes to your patch as well.

First few are updates to platform drivers to fix mask present in clip_cpus. Next ones are cleanups of cpu_cooling.c to get things properly organized.

Tested-on: Exynos5250 (Dual ARM Cortex A15).
Rebased-over: v3.18-rc7
Pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git
thermal/cpu-cooling-fixes

Cc Amit Daniel Kachhap <[email protected]>
Cc Chanwoo Choi <[email protected]>
Cc Hongbo Zhang <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Shawn Guo <[email protected]>

V1->V2:
- Dropped: cpu_cooling: Drop useless locking around idr_alloc/idr_remove
- Fixed $Subject of patches to prefix with: "thermal: " before "cpu_cooling:"
- Fixed some stupid mistakes highlighted by Eduardo and Javi.
- s/ERR_PTR(cpufreq_dev->id)/ERR_PTR(ret)
- s/sizeof(*cool_dev)/sizeof(*cpufreq_dev)

- Rebased over rc7 and that changed lots of things.
- list of cooling devices was already present in rc7, so my patch to do the same is gone.
- Other modifications done as well to fit with latest updates.

Eduardo Valentin (1):
thermal: cpu_cooling: check for the readiness of cpufreq layer

Viresh Kumar (25):
thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register()
thermal: imx: pass cpu_present_mask to cpufreq_cooling_register()
thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register()
thermal: cpu_cooling: random comment fixups
thermal: cpu_cooling: fix doc comment over struct
cpufreq_cooling_device
thermal: cpu_cooling: Add comment to clarify relation between cooling
state and frequency
thermal: cpu_cooling: Pass variable instead of its type to sizeof()
thermal: cpu_cooling: no need to set cpufreq_state to zero
thermal: cpu_cooling: no need to set cpufreq_dev to NULL
thermal: cpu_cooling: no need to initialze 'ret'
thermal: cpu_cooling: propagate error returned by idr_alloc()
thermal: cpu_cooling: Don't match min/max frequencies for all CPUs on
cooling register
thermal: cpu_cooling: don't iterate over all allowed_cpus to update
cpufreq policy
thermal: cpu_cooling: Don't check is_cpufreq_valid()
thermal: cpu_cooling: do error handling at the bottom in
__cpufreq_cooling_register()
thermal: cpu_cooling: initialize 'cpufreq_val' on registration
thermal: cpu_cooling: Merge cpufreq_apply_cooling() into
cpufreq_set_cur_state()
thermal: cpu_cooling: remove unnecessary wrapper get_cpu_frequency()
thermal: cpu_cooling: find max level during device registration
thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL
anymore
thermal: cpu_cooling: use cpufreq_dev_list instead of
cpufreq_dev_count
thermal: cpu_cooling: Pass 'cpufreq_dev' to get_property()
thermal: cpu_cooling: Store frequencies in descending order
thermal: cpu_cooling: Use cpufreq_dev->freq_table for finding
level/freq
thermal: cpu_cooling: update copyright tags

 drivers/thermal/cpu_cooling.c                      | 360 ++++++++-------------
 drivers/thermal/db8500_cpufreq_cooling.c           |  10 +-
 drivers/thermal/imx_thermal.c                      |   9 +-
 drivers/thermal/samsung/exynos_thermal_common.c    |  12 +-
 drivers/thermal/samsung/exynos_tmu.c               |   5 +-
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c |   6 -
 6 files changed, 148 insertions(+), 254 deletions(-)
Signature · 1 line
2.0.3.693.g996b0fd