summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-07 22:40:15 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-07 22:40:15 +0100
commitfaddf2f5d278f1656e9444961bdd8d9db4deb5bf (patch)
tree28a46ab7b92b9cbc8e56068b2f36f7ed13c207c5 /drivers/cpufreq
parent63ff4d0765a4e30afa659edbf09006987fc62499 (diff)
parent3baa976ae644f76f5cdb5be0fb26754c3bfb32cb (diff)
downloadblackbird-obmc-linux-faddf2f5d278f1656e9444961bdd8d9db4deb5bf.tar.gz
blackbird-obmc-linux-faddf2f5d278f1656e9444961bdd8d9db4deb5bf.zip
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq: conservative: fix requested_freq reduction issue
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index f62d822048e6..218460fcd2e4 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -80,13 +80,18 @@ static void cs_check_cpu(int cpu, unsigned int load)
/* Check for frequency decrease */
if (load < cs_tuners->down_threshold) {
+ unsigned int freq_target;
/*
* if we cannot reduce the frequency anymore, break out early
*/
if (policy->cur == policy->min)
return;
- dbs_info->requested_freq -= get_freq_target(cs_tuners, policy);
+ freq_target = get_freq_target(cs_tuners, policy);
+ if (dbs_info->requested_freq > freq_target)
+ dbs_info->requested_freq -= freq_target;
+ else
+ dbs_info->requested_freq = policy->min;
__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_L);
OpenPOWER on IntegriCloud