adding boot_cpu to cpu_online_map query
R Sharada
sharada at in.ibm.com
Wed Jul 28 19:52:09 EST 2004
Hello,
Looking at the ppc64 code, I had a query on how the boot_cpuid is set in
the cpu_online_map.
Looking at prom.c (prom_hold_cpus), I see that the boot cpu is added in the
cpu_online_map:
#ifdef CONFIG_SMP
else {
prom_printf("%x : booting cpu %s\n", cpuid, path);
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_online_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
}
#endif
Again, in start_kernel(), in smp_prepare_boot_cpu(), we again add the boot_cpuid
in the cpu_online_map:
BUG_ON(smp_processor_id() != boot_cpuid);
/* cpu_possible is set up in prom.c */
cpu_set(boot_cpuid, cpu_online_map);
paca[boot_cpuid].__current = current;
current_set[boot_cpuid] = current->thread_info;
Why is this being done twice for ppc64? Or did I miss something?
I do see that the cpu_set in prom.c is under ifdef CONFIG_SMP. So, for SMP
systems, the cpu_set for boot_cpu will be called twice and for non-SMP, it will
be set in start_kernel?
Thanks and Regards,
Sharada
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list