[PATCH] remove fixup_cpu_present_map()
Since the addition of boot_cpu_init(), fixup_cpu_present_map() has been a no-op. That's because fixup_cpu_present_map() won't touch cpu_present_map if it has any bits set, and boot_cpu_init() sets a bit. So remove fixup_cpu_present_map(). A consequence of this (actually of the boot_cpu_init() change) is that the architecture _must_ populate cpu_present_map itself (probably in smp_prepare_cpus()). fixup_cpu_present_map() won't do it any more. If the architecture doesn't do this, it'll only bring up a single CPU. The other side effect (though less serious) is that smp_prepare_boot_cpu() no longer needs to mark the boot cpu in the online and present maps - boot_cpu_init() does that for everyone (to make early printks work). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
222b9f933a
commit
9a98e2f732
1 changed files with 0 additions and 19 deletions
19
init/main.c
19
init/main.c
|
@ -645,24 +645,6 @@ static void run_init_process(char *init_filename)
|
|||
execve(init_filename, argv_init, envp_init);
|
||||
}
|
||||
|
||||
static inline void fixup_cpu_present_map(void)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
int i;
|
||||
|
||||
/*
|
||||
* If arch is not hotplug ready and did not populate
|
||||
* cpu_present_map, just make cpu_present_map same as cpu_possible_map
|
||||
* for other cpu bringup code to function as normal. e.g smp_init() etc.
|
||||
*/
|
||||
if (cpus_empty(cpu_present_map)) {
|
||||
for_each_cpu(i) {
|
||||
cpu_set(i, cpu_present_map);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int init(void * unused)
|
||||
{
|
||||
lock_kernel();
|
||||
|
@ -684,7 +666,6 @@ static int init(void * unused)
|
|||
|
||||
do_pre_smp_initcalls();
|
||||
|
||||
fixup_cpu_present_map();
|
||||
smp_init();
|
||||
sched_init_smp();
|
||||
|
||||
|
|
Loading…
Reference in a new issue