lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/5] thermal: cpufreq_cooling: Use new thermal pressure update function
From
Date
On 15/10/2021 16:45, Lukasz Luba wrote:

[...]

> @@ -479,10 +478,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
> if (ret >= 0) {
> cpufreq_cdev->cpufreq_state = state;
> cpus = cpufreq_cdev->policy->related_cpus;
> - max_capacity = arch_scale_cpu_capacity(cpumask_first(cpus));
> - capacity = frequency * max_capacity;
> - capacity /= cpufreq_cdev->policy->cpuinfo.max_freq;

Took me a while to realize that `cpufreq_cdev->policy->cpuinfo.max_freq`
is 1000 * per_cpu(freq_factor, cpu), the latter being used now in
arch_thermal_pressure_update(). Maybe worth mentioning in the patch header?

\
 
 \ /
  Last update: 2021-10-26 18:51    [W:0.143 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site