aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-03-21 06:40:42 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-02 06:04:28 -0400
commit8fce6dd29fa9d1ac880bf0cb4528e9bd5878cf68 (patch)
treef1032132dd48bde3c030a39a145d9bb992a75cfe /arch
parentb302887854d6f0c6f9fc3f1080535e7c1bd53134 (diff)
[POWERPC] powermac: Fix G5-cpufreq for cpu on/offline
The original code here is wrong, it applies "previous" knowledge. The way the cpufreq core is designed is that the policy for the secondary CPU that comes online says that it must in fact not use this policy but use the same as the other CPUs that are listed, which in fact is CPU#0. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 567d5523b690..00f50298c342 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -357,13 +357,13 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
357 357
358static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) 358static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
359{ 359{
360 if (policy->cpu != 0)
361 return -ENODEV;
362
363 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 360 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
364 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 361 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
365 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency; 362 policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
366 policy->cpus = cpu_possible_map; 363 /* secondary CPUs are tied to the primary one by the
364 * cpufreq core if in the secondary policy we tell it that
365 * it actually must be one policy together with all others. */
366 policy->cpus = cpu_online_map;
367 cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu); 367 cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu);
368 368
369 return cpufreq_frequency_table_cpuinfo(policy, 369 return cpufreq_frequency_table_cpuinfo(policy,