aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index 082077af7c44..20d784ab5ef8 100644
--- a/init/main.c
+++ b/init/main.c
@@ -14,6 +14,7 @@
14#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/syscalls.h> 16#include <linux/syscalls.h>
17#include <linux/stackprotector.h>
17#include <linux/string.h> 18#include <linux/string.h>
18#include <linux/ctype.h> 19#include <linux/ctype.h>
19#include <linux/delay.h> 20#include <linux/delay.h>
@@ -136,14 +137,14 @@ unsigned int __initdata setup_max_cpus = NR_CPUS;
136 * greater than 0, limits the maximum number of CPUs activated in 137 * greater than 0, limits the maximum number of CPUs activated in
137 * SMP mode to <NUM>. 138 * SMP mode to <NUM>.
138 */ 139 */
139#ifndef CONFIG_X86_IO_APIC 140
140static inline void disable_ioapic_setup(void) {}; 141void __weak arch_disable_smp_support(void) { }
141#endif
142 142
143static int __init nosmp(char *str) 143static int __init nosmp(char *str)
144{ 144{
145 setup_max_cpus = 0; 145 setup_max_cpus = 0;
146 disable_ioapic_setup(); 146 arch_disable_smp_support();
147
147 return 0; 148 return 0;
148} 149}
149 150
@@ -153,14 +154,14 @@ static int __init maxcpus(char *str)
153{ 154{
154 get_option(&str, &setup_max_cpus); 155 get_option(&str, &setup_max_cpus);
155 if (setup_max_cpus == 0) 156 if (setup_max_cpus == 0)
156 disable_ioapic_setup(); 157 arch_disable_smp_support();
157 158
158 return 0; 159 return 0;
159} 160}
160 161
161early_param("maxcpus", maxcpus); 162early_param("maxcpus", maxcpus);
162#else 163#else
163#define setup_max_cpus NR_CPUS 164const unsigned int setup_max_cpus = NR_CPUS;
164#endif 165#endif
165 166
166/* 167/*
@@ -541,6 +542,12 @@ asmlinkage void __init start_kernel(void)
541 */ 542 */
542 lockdep_init(); 543 lockdep_init();
543 debug_objects_early_init(); 544 debug_objects_early_init();
545
546 /*
547 * Set up the the initial canary ASAP:
548 */
549 boot_init_stack_canary();
550
544 cgroup_init_early(); 551 cgroup_init_early();
545 552
546 local_irq_disable(); 553 local_irq_disable();