Commit d78e13a8 authored by Juri Lelli's avatar Juri Lelli Committed by Russell King

ARM: 8497/1: initialize cpu_scale to its default

Instead of looping through all cpus calling set_capacity_scale, we can
initialise cpu_scale per-cpu variables to SCHED_CAPACITY_SCALE with their
definition.
Acked-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: default avatarJuri Lelli <juri.lelli@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f19768ce
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* to run the rebalance_domains for all idle cores and the cpu_capacity can be * to run the rebalance_domains for all idle cores and the cpu_capacity can be
* updated during this sequence. * updated during this sequence.
*/ */
static DEFINE_PER_CPU(unsigned long, cpu_scale); static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE;
unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
{ {
...@@ -306,8 +306,6 @@ void __init init_cpu_topology(void) ...@@ -306,8 +306,6 @@ void __init init_cpu_topology(void)
cpu_topo->socket_id = -1; cpu_topo->socket_id = -1;
cpumask_clear(&cpu_topo->core_sibling); cpumask_clear(&cpu_topo->core_sibling);
cpumask_clear(&cpu_topo->thread_sibling); cpumask_clear(&cpu_topo->thread_sibling);
set_capacity_scale(cpu, SCHED_CAPACITY_SCALE);
} }
smp_wmb(); smp_wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment