Skip to contentSkip to conversation

smp: move smp setup functions to kernel/smp.c

PATCH New Amerigo Wang 1 participant 1 message Jan 19, 2011

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 6dc95ca..48159dd 100644
@@ -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