Commit:     8fce6dd29fa9d1ac880bf0cb4528e9bd5878cf68
Parent:     b302887854d6f0c6f9fc3f1080535e7c1bd53134
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 21 21:40:42 2007 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed May 2 20:04:28 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/platforms/powermac/cpufreq_64.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c 
index 567d552..00f5029 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)
 static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
-       if (policy->cpu != 0)
-               return -ENODEV;
        policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
        policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
        policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
-       policy->cpus = cpu_possible_map;
+       /* secondary CPUs are tied to the primary one by the
+        * cpufreq core if in the secondary policy we tell it that
+        * it actually must be one policy together with all others. */
+       policy->cpus = cpu_online_map;
        cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu);
        return cpufreq_frequency_table_cpuinfo(policy,
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to