Patchwork [07/37] powerpc: call no-longer static setup_nr_cpu_ids instead of replicating it

login
register
mail settings
Submitter Milton Miller
Date May 11, 2011, 5:28 a.m.
Message ID <817ac482cbc66586496ef9fec80d84e472582e24.1305092637.git.miltonm@bga.com>
Download mbox | patch
Permalink /patch/95108/
State Accepted
Commit aa79bc2167104581cc1d77762394f2c01d3bf3f3
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Milton Miller - May 11, 2011, 5:28 a.m.
c1854e00727f50f7ac99e98d26ece04c087ef785 (powerpc: Set nr_cpu_ids early
and use it to free PACAs) copied the formerly static setup_nr_cpu_ids
from init/main.c but 34db18a054c600b6f81787165669dc572fe4de25 (smp:
move smp setup functions to kernel/smp.c) moved it to kernel/smp.c
with a declaration in include/linux/smp.h, so we can call it instead of
replicating it.

Signed-off-by: Milton Miller <miltonm@bga.com>
---
I found this cleanup while c1854e was being merged, but saved it from the
end to ease backporting.
---
 arch/powerpc/kernel/setup-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index fce759b..ef33a08 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -510,7 +510,7 @@  void __init smp_setup_cpu_maps(void)
 	cpu_init_thread_core_maps(nthreads);
 
 	/* Now that possible cpus are set, set nr_cpu_ids for later use */
-	nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
+	setup_nr_cpu_ids();
 
 	free_unused_pacas();
 }