diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2013-08-13 10:07:28 +0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:41:54 +0900 |
commit | 8f3c8bac9e7f35380c2aead14210fb381b1bd3b8 (patch) | |
tree | 5953dff80becbf3f3134081c8a4637ff95b7400c /drivers/thermal | |
parent | 0ae9cd352e6a950edeeff1a2fb28d4531cec6761 (diff) | |
download | linux-3.10-8f3c8bac9e7f35380c2aead14210fb381b1bd3b8.tar.gz linux-3.10-8f3c8bac9e7f35380c2aead14210fb381b1bd3b8.tar.bz2 linux-3.10-8f3c8bac9e7f35380c2aead14210fb381b1bd3b8.zip |
Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_thermal_notifier()
cpufreq_thermal_notifier() is to change the cpu's cpufreq in the allowed_cpus mask
when associated thermal-cpufreq cdev's cooling state is changed. It's a cpufreq policy
notifier handler and it will be triggered even if those cpus out of allowed_cpus has
changed freq policy.
cpufreq_thermal_notifier() checks the policy->cpu. If it belongs to allowed_cpus,
change max_freq(default to 0) to the desire cpufreq value and pass 0 and max_freq
to cpufreq_verify_within_limits() as cpufreq scope. But if not, do nothing and
max_freq will remain 0. This will cause the cpufreq scope to become 0~0. This
is not right. This patch is to return directly after finding cpu not belonging
to allowed_cpus.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 82e15dbb3ac..5b3744e7a95 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -322,6 +322,8 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, if (cpumask_test_cpu(policy->cpu, ¬ify_device->allowed_cpus)) max_freq = notify_device->cpufreq_val; + else + return 0; /* Never exceed user_policy.max */ if (max_freq > policy->user_policy.max) |