Skip to content

Commit

Permalink
cpufreq: Set all cpus in policy->cpus for single cluster SoCs
Browse files Browse the repository at this point in the history
With following patch, we need to set policy->cpus with mask of all possible cpus
and policy->related_cpus would be filled automatically by the core.

commit 4948b355e90080cd5ec1e91189f65a01e4186ef2
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date:   Tue Jan 29 14:39:08 2013 +0000

cpufreq: Simplify cpufreq_add_dev()

Lets fix it for all single cluster SoCs.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Feb 2, 2013
1 parent 16a44f8 commit 4c738d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/cpufreq/db8500-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */

/* policy sharing between dual CPUs */
cpumask_copy(policy->cpus, cpu_present_mask);
cpumask_setall(policy->cpus);

policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;

Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/maple-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* 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. */
cpumask_copy(policy->cpus, cpu_online_mask);
cpumask_setall(policy->cpus);
cpufreq_frequency_table_get_attr(maple_cpu_freqs, policy->cpu);

return cpufreq_frequency_table_cpuinfo(policy,
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/spear-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int spear_cpufreq_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency;
policy->cur = spear_cpufreq_get(0);

cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
cpumask_setall(policy->cpus);

return 0;
}
Expand Down

0 comments on commit 4c738d0

Please sign in to comment.