powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus()
authorEmil Medve <Emilian.Medve@freescale.com>
Wed, 21 Jan 2015 22:21:14 +0000 (16:21 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 23 Jan 2015 03:02:51 +0000 (14:02 +1100)
num_possible_cpus() is just a shorthand for it.

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/cell/smp.c
arch/powerpc/platforms/pseries/hotplug-cpu.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/xics/xics-common.c

index c8017a7bcabd2b9e44b669357da5fc6eb9c0c090..b64e7ead752f20e95926f8c5424647e70d590886 100644 (file)
@@ -106,7 +106,7 @@ static int __init smp_iic_probe(void)
 {
        iic_request_IPIs();
 
-       return cpumask_weight(cpu_possible_mask);
+       return num_possible_cpus();
 }
 
 static void smp_cell_setup_cpu(int cpu)
index f30cf4d136a475237a5cd6b2678a99b00b79343a..62475440fd453105b1df12c26dc8fad32a020b8f 100644 (file)
@@ -272,7 +272,7 @@ static int pseries_add_processor(struct device_node *np)
                 */
                printk(KERN_ERR "Cannot add cpu %s; this system configuration"
                       " supports %d logical cpus.\n", np->full_name,
-                      cpumask_weight(cpu_possible_mask));
+                      num_possible_cpus());
                goto out_unlock;
        }
 
index c4648ad5c1f36b9fba93a53fbe6d361fbbbd2573..bbfbbf2025fde5161e80e4c094b2bf962682b151 100644 (file)
@@ -1929,7 +1929,7 @@ int __init smp_mpic_probe(void)
 
        DBG("smp_mpic_probe()...\n");
 
-       nr_cpus = cpumask_weight(cpu_possible_mask);
+       nr_cpus = num_possible_cpus();
 
        DBG("nr_cpus: %d\n", nr_cpus);
 
index 365249cd346bb368d525041f15a9b2b4b1ab38e9..125743b58c7097504a0f709f6bbff179c2553cf9 100644 (file)
@@ -148,7 +148,7 @@ int __init xics_smp_probe(void)
        /* Register all the IPIs */
        xics_request_ipi();
 
-       return cpumask_weight(cpu_possible_mask);
+       return num_possible_cpus();
 }
 
 #endif /* CONFIG_SMP */