summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2007-02-05 16:12:43 -0800
committerDave Jones <davej@redhat.com>2007-02-10 20:01:47 -0500
commitc120069779e3e35917c15393cf2847fa79811eb6 (patch)
tree9e1e5529b43c151ecc9d3743e5b51ff88eb52312 /drivers/cpufreq/cpufreq.c
parent86acd49aa128bd7a1d4362c256c21fbdc2d5b1a0 (diff)
downloadlinux-c120069779e3e35917c15393cf2847fa79811eb6.tar.gz
linux-c120069779e3e35917c15393cf2847fa79811eb6.tar.bz2
linux-c120069779e3e35917c15393cf2847fa79811eb6.zip
[CPUFREQ] Remove hotplug cpu crap
The hotplug CPU locking in cpufreq is horrendous. No-one seems to care enough to fix it, so just remove it so that the 99.9% of the real world users of this code can use cpufreq without being bothered by warnings. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index a45cc89e387a..9bdcdbdcc0ad 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -415,12 +415,10 @@ static ssize_t store_##file_name \
if (ret != 1) \
return -EINVAL; \
\
- lock_cpu_hotplug(); \
mutex_lock(&policy->lock); \
ret = __cpufreq_set_policy(policy, &new_policy); \
policy->user_policy.object = policy->object; \
mutex_unlock(&policy->lock); \
- unlock_cpu_hotplug(); \
\
return ret ? ret : count; \
}
@@ -479,8 +477,6 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
&new_policy.governor))
return -EINVAL;
- lock_cpu_hotplug();
-
/* Do not use cpufreq_set_policy here or the user_policy.max
will be wrongly overridden */
mutex_lock(&policy->lock);
@@ -490,8 +486,6 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
policy->user_policy.governor = policy->governor;
mutex_unlock(&policy->lock);
- unlock_cpu_hotplug();
-
if (ret)
return ret;
else
@@ -1278,7 +1272,6 @@ EXPORT_SYMBOL(cpufreq_unregister_notifier);
*********************************************************************/
-/* Must be called with lock_cpu_hotplug held */
int __cpufreq_driver_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -1304,13 +1297,11 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
if (!policy)
return -EINVAL;
- lock_cpu_hotplug();
mutex_lock(&policy->lock);
ret = __cpufreq_driver_target(policy, target_freq, relation);
mutex_unlock(&policy->lock);
- unlock_cpu_hotplug();
cpufreq_cpu_put(policy);
return ret;
@@ -1338,7 +1329,6 @@ int cpufreq_driver_getavg(struct cpufreq_policy *policy)
EXPORT_SYMBOL_GPL(cpufreq_driver_getavg);
/*
- * Locking: Must be called with the lock_cpu_hotplug() lock held
* when "event" is CPUFREQ_GOV_LIMITS
*/
@@ -1433,7 +1423,6 @@ EXPORT_SYMBOL(cpufreq_get_policy);
/*
* data : current policy.
* policy : policy to be set.
- * Locking: Must be called with the lock_cpu_hotplug() lock held
*/
static int __cpufreq_set_policy(struct cpufreq_policy *data,
struct cpufreq_policy *policy)
@@ -1539,8 +1528,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy)
if (!data)
return -EINVAL;
- lock_cpu_hotplug();
-
/* lock this CPU */
mutex_lock(&data->lock);
@@ -1552,7 +1539,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy)
mutex_unlock(&data->lock);
- unlock_cpu_hotplug();
cpufreq_cpu_put(data);
return ret;
@@ -1576,7 +1562,6 @@ int cpufreq_update_policy(unsigned int cpu)
if (!data)
return -ENODEV;
- lock_cpu_hotplug();
mutex_lock(&data->lock);
dprintk("updating policy for CPU %u\n", cpu);
@@ -1603,7 +1588,6 @@ int cpufreq_update_policy(unsigned int cpu)
ret = __cpufreq_set_policy(data, &policy);
mutex_unlock(&data->lock);
- unlock_cpu_hotplug();
cpufreq_cpu_put(data);
return ret;
}