OSDN Git Service

powerpc/smp: Optimize start_secondary
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Mon, 10 Aug 2020 07:18:30 +0000 (12:48 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Sep 2020 12:13:31 +0000 (22:13 +1000)
commitcaa8e29da59926bef099b46ab6280333d583e944
treee98dec4cceb4be5accf376178f731feeadbff113
parentf6606cfdfbcda00ce8a6e63c8fc13c93e73ac059
powerpc/smp: Optimize start_secondary

In start_secondary, even if shared_cache was already set, system does a
redundant match for cpumask. This redundant check can be removed by
checking if shared_cache is already set.

While here, localize the sibling_mask variable to within the if
condition.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200810071834.92514-7-srikar@linux.vnet.ibm.com
arch/powerpc/kernel/smp.c