Skip to contentSkip to conversation

OMAP2+: cpufreq: Enable all CPUs in shared policy mask

PATCH In review Todd Poynor 2 participants 2 messages Jun 7, 2011 – Jun 8, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP2+: cpufreq: Enable all CPUs in shared policy mask

Enable all CPUs in the shared policy in the CPU init callback. Otherwise, the governor CPUFREQ_GOV_START event is invoked with a policy that only includes the first CPU, leaving other CPUs uninitialized by the governor.

---
 arch/arm/mach-omap2/omap2plus-cpufreq.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/omap2plus-cpufreq.c +1 -3
index 77efcb0..0fe4edb 100644
@@ -166,7 +166,6 @@ static inline void freq_table_free(void)
 static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
 {
 	int result = 0;
-	static cpumask_var_t cpumask;
 
 	mpu_clk = clk_get(NULL, mpu_clk_name);
 	if (IS_ERR(mpu_clk))
@@ -207,8 +206,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
 	 */
 	if (is_smp()) {
 		policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
-		cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
-		cpumask_copy(policy->cpus, cpumask);
+		cpumask_setall(policy->cpus);
 	}
 
 	/* FIXME: what's the actual transition time? */
Signature · 1 line
1.7.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Todd Poynor

Enable all CPUs in the shared policy in the CPU init callback. Otherwise, the governor CPUFREQ_GOV_START event is invoked with a policy that only includes the first CPU, leaving other CPUs uninitialized by the governor.

Looks good to me.

Quoted 26 lines
---
  arch/arm/mach-omap2/omap2plus-cpufreq.c |    4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/omap2plus-cpufreq.c +1 -3
index 77efcb0..0fe4edb 100644
@@ -166,7 +166,6 @@ static inline void freq_table_free(void)
  static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
  {
  	int result = 0;
-	static cpumask_var_t cpumask;
 
  	mpu_clk = clk_get(NULL, mpu_clk_name);
  	if (IS_ERR(mpu_clk))
@@ -207,8 +206,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
  	 */
  	if (is_smp()) {
  		policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
-		cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
-		cpumask_copy(policy->cpus, cpumask);
+		cpumask_setall(policy->cpus);
  	}
 
  	/* FIXME: what's the actual transition time? */