diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-26 04:37:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:57 -0500 |
commit | 9a98e2f7326d626d75cab2fe108c34b733227918 (patch) | |
tree | de27536a7865162c9664187fa3e0bf6e10db242e | |
parent | 222b9f933a76b127a073f45278d2b0199587e8ce (diff) |
[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>
-rw-r--r-- | init/main.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/init/main.c b/init/main.c index 006dcd547dc2..64466ea1984c 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -645,24 +645,6 @@ static void run_init_process(char *init_filename) | |||
645 | execve(init_filename, argv_init, envp_init); | 645 | execve(init_filename, argv_init, envp_init); |
646 | } | 646 | } |
647 | 647 | ||
648 | static inline void fixup_cpu_present_map(void) | ||
649 | { | ||
650 | #ifdef CONFIG_SMP | ||
651 | int i; | ||
652 | |||
653 | /* | ||
654 | * If arch is not hotplug ready and did not populate | ||
655 | * cpu_present_map, just make cpu_present_map same as cpu_possible_map | ||
656 | * for other cpu bringup code to function as normal. e.g smp_init() etc. | ||
657 | */ | ||
658 | if (cpus_empty(cpu_present_map)) { | ||
659 | for_each_cpu(i) { | ||
660 | cpu_set(i, cpu_present_map); | ||
661 | } | ||
662 | } | ||
663 | #endif | ||
664 | } | ||
665 | |||
666 | static int init(void * unused) | 648 | static int init(void * unused) |
667 | { | 649 | { |
668 | lock_kernel(); | 650 | lock_kernel(); |
@@ -684,7 +666,6 @@ static int init(void * unused) | |||
684 | 666 | ||
685 | do_pre_smp_initcalls(); | 667 | do_pre_smp_initcalls(); |
686 | 668 | ||
687 | fixup_cpu_present_map(); | ||
688 | smp_init(); | 669 | smp_init(); |
689 | sched_init_smp(); | 670 | sched_init_smp(); |
690 | 671 | ||