diff options
author | Jonghwa Lee <jonghwa3.lee@samsung.com> | 2015-07-13 19:41:51 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:46:43 +0900 |
commit | 144105fe3e56404710371b2d591bbb07c85da065 (patch) | |
tree | 008dd560fba82be72ce679577ac746c9e943a545 /drivers/thermal | |
parent | f27f25692c95d0cfc9902d26527329273823efb0 (diff) |
thermal: cpu_cooling: Update cpufreq policy only for online cpus.
Current cpu_cooling driver sets cooling state without consideration of
CPU hotplug. However, applicable CPUs may differs because of hotplug,
so it has to check whether target CPU is online either.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 5db5e91fd12f..62f129450e94 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -260,7 +260,8 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state) { struct cpufreq_cooling_device *cpufreq_device = cdev->devdata; - unsigned int cpu = cpumask_any(&cpufreq_device->allowed_cpus); + unsigned int cpu = cpumask_any_and(&cpufreq_device->allowed_cpus, + cpu_online_mask); unsigned int clip_freq; /* Request state should be less than max_level */ |