summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2013-09-07 01:23:55 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-10 02:49:47 +0200
commit56d07db274b7b15ca38b60ea4a762d40de093000 (patch)
treee0168e68e3957a3122b1ed8069799b53078a0b05 /drivers/cpufreq
parent4f750c930822b92df74327a4d1364eff87701360 (diff)
downloadop-kernel-dev-56d07db274b7b15ca38b60ea4a762d40de093000.zip
op-kernel-dev-56d07db274b7b15ca38b60ea4a762d40de093000.tar.gz
cpufreq: Remove temporary fix for race between CPU hotplug and sysfs-writes
Commit "cpufreq: serialize calls to __cpufreq_governor()" had been a temporary and partial solution to the race condition between writing to a cpufreq sysfs file and taking a CPU offline. Now that we have a proper and complete solution to that problem, remove the temporary fix. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index cf01658..2863214 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1739,15 +1739,13 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
policy->cpu, event);
mutex_lock(&cpufreq_governor_lock);
- if (policy->governor_busy
- || (policy->governor_enabled && event == CPUFREQ_GOV_START)
+ if ((policy->governor_enabled && event == CPUFREQ_GOV_START)
|| (!policy->governor_enabled
&& (event == CPUFREQ_GOV_LIMITS || event == CPUFREQ_GOV_STOP))) {
mutex_unlock(&cpufreq_governor_lock);
return -EBUSY;
}
- policy->governor_busy = true;
if (event == CPUFREQ_GOV_STOP)
policy->governor_enabled = false;
else if (event == CPUFREQ_GOV_START)
@@ -1776,9 +1774,6 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
((event == CPUFREQ_GOV_POLICY_EXIT) && !ret))
module_put(policy->governor->owner);
- mutex_lock(&cpufreq_governor_lock);
- policy->governor_busy = false;
- mutex_unlock(&cpufreq_governor_lock);
return ret;
}
OpenPOWER on IntegriCloud