Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3a10c14 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki
Browse files

cpufreq-dt: pass 'policy->related_cpus' to of_cpufreq_cooling_register()



The second parameter of of_cpufreq_cooling_register() should be the CPUs to
which the frequency constraint will apply. As the cpufreq-dt driver now supports
platforms with multiple 'struct cpufreq_policy' instances (i.e. > 1 clock
domains for CPUs), passing 'cpu_present_mask' isn't correct anymore. As every
policy will have a set of CPUs and that may not be equal to 'cpu_present_mask'
always.

So, pass only mask of CPUs which are controlled by current policy.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarEduardo Valentin <edubezval@gmail.com>
Tested-by: default avatarEduardo Valentin <edubezval@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 90452e61
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -274,7 +274,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
	 * thermal DT code takes care of matching them.
	 * thermal DT code takes care of matching them.
	 */
	 */
	if (of_find_property(np, "#cooling-cells", NULL)) {
	if (of_find_property(np, "#cooling-cells", NULL)) {
		cdev = of_cpufreq_cooling_register(np, cpu_present_mask);
		cdev = of_cpufreq_cooling_register(np, policy->related_cpus);
		if (IS_ERR(cdev))
		if (IS_ERR(cdev))
			dev_err(cpu_dev,
			dev_err(cpu_dev,
				"running cpufreq without cooling device: %ld\n",
				"running cpufreq without cooling device: %ld\n",