diff options
author | Dave Jones <davej@redhat.com> | 2005-10-27 19:16:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-27 19:29:24 -0400 |
commit | 927321440976d0781a252eefe686ae6b0f236ae2 (patch) | |
tree | 537b573706d095c096e273f027975b8e6f9a2cd9 /drivers/cpufreq | |
parent | 79b95a454bb5c1d9b7287d1016a70885ba3f346c (diff) |
[PATCH] cpufreq: SMP fix for conservative governor
Don't try to access not-present CPUs. Conservative governor will always
oops on SMP without this fix.
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=4781
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index e1df376e709..2ed5c4363b5 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -315,9 +315,9 @@ static void dbs_check_cpu(int cpu) | |||
315 | policy = this_dbs_info->cur_policy; | 315 | policy = this_dbs_info->cur_policy; |
316 | 316 | ||
317 | if ( init_flag == 0 ) { | 317 | if ( init_flag == 0 ) { |
318 | for ( /* NULL */; init_flag < NR_CPUS; init_flag++ ) { | 318 | for_each_online_cpu(j) { |
319 | dbs_info = &per_cpu(cpu_dbs_info, init_flag); | 319 | dbs_info = &per_cpu(cpu_dbs_info, j); |
320 | requested_freq[cpu] = dbs_info->cur_policy->cur; | 320 | requested_freq[j] = dbs_info->cur_policy->cur; |
321 | } | 321 | } |
322 | init_flag = 1; | 322 | init_flag = 1; |
323 | } | 323 | } |