From 9c0b01deb47454f4543bd745014b50872444d4d9 Mon Sep 17 00:00:00 2001 From: Alexander Clouter Date: Fri, 13 Feb 2009 19:01:51 +0000 Subject: [PATCH] --- yaml --- r: 132673 b: refs/heads/master c: f407a08bb7eff5ddbe0d9173d8717794a910771f h: refs/heads/master i: 132671: f1f51d201da105d6ef799eafe1616b31abe4ae38 v: v3 --- [refs] | 2 +- trunk/drivers/cpufreq/cpufreq_conservative.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index c43f269cc188..456c44c46a67 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 11a80a9c7668c40c40a03ae15bd2c6b215058b2e +refs/heads/master: f407a08bb7eff5ddbe0d9173d8717794a910771f diff --git a/trunk/drivers/cpufreq/cpufreq_conservative.c b/trunk/drivers/cpufreq/cpufreq_conservative.c index a18cfbf021b3..a16a5b8c1dc5 100644 --- a/trunk/drivers/cpufreq/cpufreq_conservative.c +++ b/trunk/drivers/cpufreq/cpufreq_conservative.c @@ -137,10 +137,21 @@ dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val, struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, freq->cpu); + struct cpufreq_policy *policy; + if (!this_dbs_info->enable) return 0; - this_dbs_info->requested_freq = freq->new; + policy = this_dbs_info->cur_policy; + + /* + * we only care if our internally tracked freq moves outside + * the 'valid' ranges of freqency available to us otherwise + * we do not change it + */ + if (this_dbs_info->requested_freq > policy->max + || this_dbs_info->requested_freq < policy->min) + this_dbs_info->requested_freq = freq->new; return 0; }