Thread (17 messages) 17 messages, 4 authors, 2021-10-28

Re: [PATCH v2 2/5] thermal: cpufreq_cooling: Use new thermal pressure update function

From: Dietmar Eggemann <dietmar.eggemann@arm.com>
Date: 2021-10-26 16:51:13
Also in: linux-arm-msm, linux-pm, lkml

On 15/10/2021 16:45, Lukasz Luba wrote:

[...]
quoted hunk ↗ jump to hunk
@@ -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?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help