1
0
Fork 0

[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>
hifive-unleashed-5.1
Dominik Brodowski 2006-03-26 11:11:03 +02:00
parent 9cbad61b41
commit 7c9d8c0e84
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}