]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: [SMP] avoid overriding present cpumask
authorNoam Camus <noamca@mellanox.com>
Sun, 30 Oct 2016 07:48:42 +0000 (09:48 +0200)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 1 Nov 2016 00:12:41 +0000 (17:12 -0700)
commitcab1fce61b4e34a0a155237086c7c5fd2c60410c
treeadf0f7a698653109101927ef4e6bdf0f457361e1
parent4a88c9df5eeb51b45ad82611af414c5cc0546a4d
ARC: [SMP] avoid overriding present cpumask

At smp_prepare_cpus() we set present cpu mask as part of init
for all CPUs at range [0-max_cpus].
This is done without checking if this mask is already being set.
At platform of eznps this mask is already being initialized at
smp_init_cpus() by using hook plat_smp_ops.init_early_smp().
So to avoid overriding of present cpu mask we check the number of
bits which are set in this mask. At the begin only bit for boot CPU
is set so if number of bits already set is no more than one we can be
assure that there is no overriding of this mask.

Signed-off-by: Noam Camus <noamca@mellanox.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/smp.c