aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq-nforce2.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-07-19 15:42:48 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-26 00:15:46 +0200
commitfe829ed8ef1f3c7ac22843bd594ef2f6c4044288 (patch)
tree2dedcb6914c8d28957e7488cbe337a7d9d021abe /drivers/cpufreq/cpufreq-nforce2.c
parentcpufreq: schedutil: Set dynamic_switching to true (diff)
downloadlinux-dev-fe829ed8ef1f3c7ac22843bd594ef2f6c4044288.tar.xz
linux-dev-fe829ed8ef1f3c7ac22843bd594ef2f6c4044288.zip
cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag
The policy->transition_latency field is used for multiple purposes today and its not straight forward at all. This is how it is used: A. Set the correct transition_latency value. B. Set it to CPUFREQ_ETERNAL because: 1. We don't want automatic dynamic switching (with ondemand/conservative) to happen at all. 2. We don't know the transition latency. This patch handles the B.1. case in a more readable way. A new flag for the cpufreq drivers is added to disallow use of cpufreq governors which have dynamic_switching flag set. All the current cpufreq drivers which are setting transition_latency unconditionally to CPUFREQ_ETERNAL are updated to use it. They don't need to set transition_latency anymore. There shouldn't be any functional change after this patch. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-nforce2.c')
-rw-r--r--drivers/cpufreq/cpufreq-nforce2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c
index 5503d491b016..dbf82f36d270 100644
--- a/drivers/cpufreq/cpufreq-nforce2.c
+++ b/drivers/cpufreq/cpufreq-nforce2.c
@@ -357,7 +357,6 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
/* cpuinfo and default policy values */
policy->min = policy->cpuinfo.min_freq = min_fsb * fid * 100;
policy->max = policy->cpuinfo.max_freq = max_fsb * fid * 100;
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
return 0;
}
@@ -369,6 +368,7 @@ static int nforce2_cpu_exit(struct cpufreq_policy *policy)
static struct cpufreq_driver nforce2_driver = {
.name = "nforce2",
+ .flags = CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING,
.verify = nforce2_verify,
.target = nforce2_target,
.get = nforce2_get,