aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/samsung
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-12-04 09:41:46 +0530
committerEduardo Valentin <edubezval@gmail.com>2014-12-08 12:08:54 -0400
commitf3764e6c187b2841971d6347f81acc1a5264a92f (patch)
tree8f73d00cea011cd5e3f7207debc00cabe257aa5f /drivers/thermal/samsung
parentthermal: imx: pass cpu_present_mask to cpufreq_cooling_register() (diff)
downloadlinux-dev-f3764e6c187b2841971d6347f81acc1a5264a92f.tar.xz
linux-dev-f3764e6c187b2841971d6347f81acc1a5264a92f.zip
thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register()
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: Chanwoo Choi <cw00.choi@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/samsung')
-rw-r--r--drivers/thermal/samsung/exynos_thermal_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c
index 50a1f17c6221..6dc3815cc73f 100644
--- a/drivers/thermal/samsung/exynos_thermal_common.c
+++ b/drivers/thermal/samsung/exynos_thermal_common.c
@@ -347,7 +347,6 @@ void exynos_report_trigger(struct thermal_sensor_conf *conf)
int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
{
int ret;
- struct cpumask mask_val;
struct exynos_thermal_zone *th_zone;
if (!sensor_conf || !sensor_conf->read_temperature) {
@@ -367,9 +366,8 @@ int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
* sensor
*/
if (sensor_conf->cooling_data.freq_clip_count > 0) {
- cpumask_set_cpu(0, &mask_val);
th_zone->cool_dev[th_zone->cool_dev_size] =
- cpufreq_cooling_register(&mask_val);
+ cpufreq_cooling_register(cpu_present_mask);
if (IS_ERR(th_zone->cool_dev[th_zone->cool_dev_size])) {
ret = PTR_ERR(th_zone->cool_dev[th_zone->cool_dev_size]);
if (ret != -EPROBE_DEFER)