smp: move smp setup functions to kernel/smp.c
PATCH 1/1 smp: move smp setup functions to kernel/smp.c
This patch moves setup_nr_cpu_ids(), smp_init() and some other SMP boot parameter setup functions from init/main.c to kenrel/smp.c, saves some #ifdef CONFIG_SMP.
Compile tested.
Signed-off-by WANG Cong <[email protected]>
--- include/linux/smp.h | 2 + init/main.c | 90 +-------------------------------------------------- kernel/smp.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 89 deletions(-)
include/linux/smp.h +2 -0
@@ -114,6 +114,8 @@ int on_each_cpu(smp_call_func_t func, void *info, int wait);void smp_prepare_boot_cpu (void );extern unsigned int setup_max_cpus; +extern void __init setup_nr_cpu_ids (void ); +extern void __init smp_init (void );#else /* !SMP */
init/main.c +1 -89
108 lines not on this page · raw message
kernel/smp.c +81 -0
87 lines not on this page · raw message