* [PATCH] powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus()
@ 2015-01-21 22:21 Emil Medve
2015-01-22 1:12 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: Emil Medve @ 2015-01-21 22:21 UTC (permalink / raw)
To: linuxppc-dev, benh; +Cc: Emil Medve
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
arch/powerpc/platforms/cell/smp.c | 2 +-
arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +-
arch/powerpc/sysdev/mpic.c | 2 +-
arch/powerpc/sysdev/xics/xics-common.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index c8017a7..b64e7ea 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -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)
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index f30cf4d..6247544 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -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;
}
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index c4648ad..bbfbbf2 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -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);
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index 365249c..125743b 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -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 */
--
2.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus()
2015-01-21 22:21 [PATCH] powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus() Emil Medve
@ 2015-01-22 1:12 ` Michael Ellerman
2015-01-22 1:46 ` Emil Medve
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2015-01-22 1:12 UTC (permalink / raw)
To: Emil Medve; +Cc: linuxppc-dev
On Wed, 2015-01-21 at 16:21 -0600, Emil Medve wrote:
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Why?
Because:
#define num_possible_cpus() cpumask_weight(cpu_possible_mask)
But please say so in future. I'll fix it up this time.
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus()
2015-01-22 1:12 ` Michael Ellerman
@ 2015-01-22 1:46 ` Emil Medve
0 siblings, 0 replies; 3+ messages in thread
From: Emil Medve @ 2015-01-22 1:46 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
Hello Michael,
On 01/21/2015 07:12 PM, Michael Ellerman wrote:
> On Wed, 2015-01-21 at 16:21 -0600, Emil Medve wrote:
>> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
>
> Why?
>
> Because:
>
> #define num_possible_cpus() cpumask_weight(cpu_possible_mask)
>
>
> But please say so in future. I'll fix it up this time.
Thank you
Cheers,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-22 2:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 22:21 [PATCH] powerpc: Replace cpumask_weight(cpu_possible_mask) with num_possible_cpus() Emil Medve
2015-01-22 1:12 ` Michael Ellerman
2015-01-22 1:46 ` Emil Medve
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.