Message ID | fc802a046dd2ad250e934a05af1104789f5c12e7.1417664938.git.viresh.kumar@linaro.org |
---|---|
State | Accepted |
Commit | b45257b10d7cc21ed0393f31e1f8ac6cdde9fa18 |
Headers | show |
On Thu, Dec 4, 2014 at 5:11 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > cpufreq_cooling_register() expects mask of all the CPUs where frequency > constraint is applicable. > > This platform has more than one CPU to which these constraints will apply and so > passing mask of only CPU0 wouldn't be sufficient. Also, this platform has a > single cluster of CPUs and the constraint applies to all CPUs. > > If CPU0 is hoplugged out then we may face strange BUGs as cpu_cooling framework > isn't aware of any siblings sharing clock line. > > Fix it by passing cpu_present_mask to cpufreq_cooling_register(). > > Cc: Hongbo Zhang <hongbo.zhang@linaro.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/thermal/db8500_cpufreq_cooling.c b/drivers/thermal/db8500_cpufreq_cooling.c index 1ac7ec6..3cc3dd9 100644 --- a/drivers/thermal/db8500_cpufreq_cooling.c +++ b/drivers/thermal/db8500_cpufreq_cooling.c @@ -27,11 +27,8 @@ static int db8500_cpufreq_cooling_probe(struct platform_device *pdev) { struct thermal_cooling_device *cdev; - struct cpumask mask_val; - - cpumask_set_cpu(0, &mask_val); - cdev = cpufreq_cooling_register(&mask_val); + cdev = cpufreq_cooling_register(cpu_present_mask); if (IS_ERR(cdev)) { dev_err(&pdev->dev, "Failed to register cooling device\n"); return PTR_ERR(cdev);
cpufreq_cooling_register() expects mask of all the CPUs where frequency constraint is applicable. This platform has more than one CPU to which these constraints will apply and so passing mask of only CPU0 wouldn't be sufficient. Also, this platform has a single cluster of CPUs and the constraint applies to all CPUs. If CPU0 is hoplugged out then we may face strange BUGs as cpu_cooling framework isn't aware of any siblings sharing clock line. Fix it by passing cpu_present_mask to cpufreq_cooling_register(). Cc: Hongbo Zhang <hongbo.zhang@linaro.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/thermal/db8500_cpufreq_cooling.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)