summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_conservative.c
diff options
context:
space:
mode:
authorXiaoguang Chen <chenxg@marvell.com>2013-11-08 13:23:52 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-12 23:18:20 +0100
commit6d7bcb1464a89181ddc4b4584ad6e0c7566ae31b (patch)
tree72a590b53d27da24dff31603256eb8b9bda646b8 /drivers/cpufreq/cpufreq_conservative.c
parent3baa976ae644f76f5cdb5be0fb26754c3bfb32cb (diff)
downloadop-kernel-dev-6d7bcb1464a89181ddc4b4584ad6e0c7566ae31b.zip
op-kernel-dev-6d7bcb1464a89181ddc4b4584ad6e0c7566ae31b.tar.gz
cpufreq: conservative: set requested_freq to policy max when it is over policy max
When requested_freq is over policy->max, set it to policy->max. This can help to speed up decreasing frequency. Signed-off-by: Xiaoguang Chen <chenxg@marvell.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_conservative.c')
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 218460f..25a70d0 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -68,6 +68,9 @@ static void cs_check_cpu(int cpu, unsigned int load)
dbs_info->requested_freq += get_freq_target(cs_tuners, policy);
+ if (dbs_info->requested_freq > policy->max)
+ dbs_info->requested_freq = policy->max;
+
__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_H);
return;
OpenPOWER on IntegriCloud