call it right after we are done with MADT/mptable handling, instead of
doing that in setup_per_cpu_areas() later on...
this way for_possible_cpu() can be used early.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
                get_smp_config();
 #endif
 
+       prefill_possible_map();
 #ifdef CONFIG_X86_64
        init_cpu_to_node();
 #endif
 
        char *ptr;
        int cpu;
 
-       /* no processor from mptable or madt */
-       if (!num_processors)
-               num_processors = 1;
-
-#ifdef CONFIG_HOTPLUG_CPU
-       prefill_possible_map();
-#else
-       nr_cpu_ids = num_processors;
-#endif
-
        /* Setup cpu_pda map */
        setup_cpu_pda_map();
 
 
        int i;
        int possible;
 
+       /* no processor from mptable or madt */
+       if (!num_processors)
+               num_processors = 1;
+
+#ifdef CONFIG_HOTPLUG_CPU
        if (additional_cpus == -1) {
                if (disabled_cpus > 0)
                        additional_cpus = disabled_cpus;
                else
                        additional_cpus = 0;
        }
+#else
+       additional_cpus = 0;
+#endif
        possible = num_processors + additional_cpus;
        if (possible > NR_CPUS)
                possible = NR_CPUS;
 
 {
        return cpus_weight(cpu_callout_map);
 }
+#else
+static inline void prefill_possible_map(void)
+{
+}
 #endif /* CONFIG_SMP */
 
 extern unsigned disabled_cpus __cpuinitdata;