diff options
author | Juri Lelli <juri.lelli@arm.com> | 2016-01-07 10:27:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-26 18:49:02 -0500 |
commit | d78e13a8a8b795b605eb58a48365591f2e7c690b (patch) | |
tree | ea450995a3ca3d2ed13c3bd95322a2de65ae861e | |
parent | f19768ce0e84ac8a1ab03f87784bdf94bf94e140 (diff) |
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: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/topology.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 08b7847bf912..ec279d161b32 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c | |||
@@ -40,7 +40,7 @@ | |||
40 | * to run the rebalance_domains for all idle cores and the cpu_capacity can be | 40 | * to run the rebalance_domains for all idle cores and the cpu_capacity can be |
41 | * updated during this sequence. | 41 | * updated during this sequence. |
42 | */ | 42 | */ |
43 | static DEFINE_PER_CPU(unsigned long, cpu_scale); | 43 | static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; |
44 | 44 | ||
45 | unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) | 45 | unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) |
46 | { | 46 | { |
@@ -306,8 +306,6 @@ void __init init_cpu_topology(void) | |||
306 | cpu_topo->socket_id = -1; | 306 | cpu_topo->socket_id = -1; |
307 | cpumask_clear(&cpu_topo->core_sibling); | 307 | cpumask_clear(&cpu_topo->core_sibling); |
308 | cpumask_clear(&cpu_topo->thread_sibling); | 308 | cpumask_clear(&cpu_topo->thread_sibling); |
309 | |||
310 | set_capacity_scale(cpu, SCHED_CAPACITY_SCALE); | ||
311 | } | 309 | } |
312 | smp_wmb(); | 310 | smp_wmb(); |
313 | 311 | ||