summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-26 11:11:03 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-26 11:11:03 +0200
commit7c9d8c0e84d395a01289ebd1597758939a875a86 (patch)
tree7cdb1540d4e791d6e2e0a63c9a62ecf8ceccd0f9 /drivers/cpufreq/cpufreq_ondemand.c
parent[PATCH] cpufreq_ondemand: keep ignore_nice_load value when it is reselected (diff)
downloadlinux-7c9d8c0e84d395a01289ebd1597758939a875a86.tar.xz
linux-7c9d8c0e84d395a01289ebd1597758939a875a86.zip
[PATCH] cpufreq_ondemand: add range check
Assert that cpufreq_target is, at least, called with the minimum frequency allowed by this policy, not something lower. It triggered problems on ARM. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index cd846f57147e..956d121cb161 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -351,6 +351,9 @@ static void dbs_check_cpu(int cpu)
freq_next = (freq_next * policy->cur) /
(dbs_tuners_ins.up_threshold - 10);
+ if (freq_next < policy->min)
+ freq_next = policy->min;
+
if (freq_next <= ((policy->cur * 95) / 100))
__cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L);
}