diff --git a/[refs] b/[refs] index e429674fc95d..3ee9bff1e322 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74889e41d9a1f80928130a02af9b010673bc5ba7 +refs/heads/master: 64bafa9db7e92d5a46402613188b71800924ca1f diff --git a/trunk/arch/powerpc/platforms/cell/cbe_cpufreq.c b/trunk/arch/powerpc/platforms/cell/cbe_cpufreq.c index 9a9932624c0c..0b6e8ee85ab1 100644 --- a/trunk/arch/powerpc/platforms/cell/cbe_cpufreq.c +++ b/trunk/arch/powerpc/platforms/cell/cbe_cpufreq.c @@ -24,6 +24,7 @@ #include #include #include +#include "cbe_regs.h" #include "cbe_cpufreq.h" static DEFINE_MUTEX(cbe_switch_mutex); @@ -78,6 +79,15 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) pr_debug("init cpufreq on CPU %d\n", policy->cpu); + /* + * Let's check we can actually get to the CELL regs + */ + if (!cbe_get_cpu_pmd_regs(policy->cpu) || + !cbe_get_cpu_mic_tm_regs(policy->cpu)) { + pr_info("invalid CBE regs pointers for cpufreq\n"); + return -EINVAL; + } + max_freqp = of_get_property(cpu, "clock-frequency", NULL); of_node_put(cpu);