diff options
author | Lin Fuzhen <fuzhen.lin@freescale.com> | 2012-07-25 15:09:07 +0800 |
---|---|---|
committer | Lin Fuzhen <fuzhen.lin@freescale.com> | 2012-07-26 09:29:58 +0800 |
commit | 9f607fddb874258c1f4e5230c8603c7466e03a0c (patch) | |
tree | a5f2e272b983fcc3cf4c0d17de3b3a8958b40ab5 /drivers | |
parent | e65fb60817f2d667aa11cf219bd123b2fa4de803 (diff) |
ENGR00218274 CPUFREQ: fix conservative governor bug
When system not boot up all cores, such as adding max_cpus=n,
n<NR_CPUS, then the conservative governor will increase the cpu
frequncy to the highest freq and never get to down.
Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 33b56e5c5c14..1d54277572f0 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -5,6 +5,7 @@ * (C) 2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>. * Jun Nakajima <jun.nakajima@intel.com> * (C) 2009 Alexander Clouter <alex@digriz.org.uk> + * Copyright (C) 2012 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -342,7 +343,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) */ /* Get Absolute Load */ - for_each_cpu(j, policy->cpus) { + for_each_online_cpu(j) { struct cpu_dbs_info_s *j_dbs_info; cputime64_t cur_wall_time, cur_idle_time; unsigned int idle_time, wall_time; @@ -492,7 +493,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, mutex_lock(&dbs_mutex); - for_each_cpu(j, policy->cpus) { + for_each_online_cpu(j) { struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu(cs_cpu_dbs_info, j); j_dbs_info->cur_policy = policy; |