aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index 84d3732c0ce5..546ebd2f44ba 100644
--- a/init/main.c
+++ b/init/main.c
@@ -380,12 +380,7 @@ EXPORT_SYMBOL(nr_cpu_ids);
380/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */ 380/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */
381static void __init setup_nr_cpu_ids(void) 381static void __init setup_nr_cpu_ids(void)
382{ 382{
383 int cpu, highest_cpu = 0; 383 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
384
385 for_each_possible_cpu(cpu)
386 highest_cpu = cpu;
387
388 nr_cpu_ids = highest_cpu + 1;
389} 384}
390 385
391#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA 386#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA