aboutsummaryrefslogtreecommitdiff
path: root/drivers/thermal/cpu_cooling.c
diff options
context:
space:
mode:
authorKapileshwar Singh <kapileshwar.singh@arm.com>2015-03-16 12:00:50 +0000
committerKevin Hilman <khilman@linaro.org>2015-06-05 15:46:02 -0700
commitaa4ad8bb85ada357e7de399ee3cb24ebfcb49383 (patch)
tree0834a3b22ca87b6a0695b5db44cf38e167587b3a /drivers/thermal/cpu_cooling.c
parentcc8fcb42f85653a1bb6a774186364e5a2fa537f7 (diff)
thermal: cpu_cooling: Remove cpu_dev update on policy CPU update
It was initially understood that an update to the cpu_device (cached in cpufreq_cooling_device) was required to ascertain the correct operating point of the device on a cpufreq policy->cpu update or creation or deletion of a cpufreq policy. (e.g. when the existing policy CPU goes offline). This update is not required and it is possible to ascertain the OPPs from the leading CPU in a cpufreq domain even if the CPU is hotplugged out. Fixes: e0128d8ab423 ("thermal: cpu_cooling: implement the power cooling device API") Acked-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> (cherry picked from commit 54b92aae834ce8d02d6092f8ae5eb1fe0d607f1e) Signed-off-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'drivers/thermal/cpu_cooling.c')
-rw-r--r--drivers/thermal/cpu_cooling.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index c4974144c787..2e15133b4793 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -199,39 +199,6 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
}
EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
-static void update_cpu_device(int cpu)
-{
- struct cpufreq_cooling_device *cpufreq_dev;
-
- mutex_lock(&cooling_cpufreq_lock);
- list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
- if (cpumask_test_cpu(cpu, &cpufreq_dev->allowed_cpus)) {
- cpufreq_dev->cpu_dev = get_cpu_device(cpu);
- if (!cpufreq_dev->cpu_dev) {
- dev_warn(&cpufreq_dev->cool_dev->device,
- "No cpu device for new policy cpu %d\n",
- cpu);
- }
- break;
- }
- }
- mutex_unlock(&cooling_cpufreq_lock);
-}
-
-static void remove_cpu_device(int cpu)
-{
- struct cpufreq_cooling_device *cpufreq_dev;
-
- mutex_lock(&cooling_cpufreq_lock);
- list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
- if (cpumask_test_cpu(cpu, &cpufreq_dev->allowed_cpus)) {
- cpufreq_dev->cpu_dev = NULL;
- break;
- }
- }
- mutex_unlock(&cooling_cpufreq_lock);
-}
-
/**
* cpufreq_thermal_notifier - notifier callback for cpufreq policy change.
* @nb: struct notifier_block * with callback info.
@@ -268,13 +235,6 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
}
mutex_unlock(&cooling_cpufreq_lock);
break;
-
- case CPUFREQ_CREATE_POLICY:
- update_cpu_device(policy->cpu);
- break;
- case CPUFREQ_REMOVE_POLICY:
- remove_cpu_device(policy->cpu);
- break;
default:
return NOTIFY_DONE;
}