Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Juri Lelli and committed by
Russell King
d78e13a8 f19768ce

+1 -3
+1 -3
arch/arm/kernel/topology.c
··· 40 40 * to run the rebalance_domains for all idle cores and the cpu_capacity can be 41 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 45 unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) 46 46 { ··· 306 306 cpu_topo->socket_id = -1; 307 307 cpumask_clear(&cpu_topo->core_sibling); 308 308 cpumask_clear(&cpu_topo->thread_sibling); 309 - 310 - set_capacity_scale(cpu, SCHED_CAPACITY_SCALE); 311 309 } 312 310 smp_wmb(); 313 311