• Noam Camus's avatar
    ARC: [SMP] avoid overriding present cpumask · 8f6d9eb2
    Noam Camus authored
    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: default avatarNoam Camus <noamca@mellanox.com>
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    8f6d9eb2
smp.c 8.51 KB