aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index 106e02d7ffa5..40aaa020cd68 100644
--- a/init/main.c
+++ b/init/main.c
@@ -149,6 +149,20 @@ static int __init nosmp(char *str)
149 149
150early_param("nosmp", nosmp); 150early_param("nosmp", nosmp);
151 151
152/* this is hard limit */
153static int __init nrcpus(char *str)
154{
155 int nr_cpus;
156
157 get_option(&str, &nr_cpus);
158 if (nr_cpus > 0 && nr_cpus < nr_cpu_ids)
159 nr_cpu_ids = nr_cpus;
160
161 return 0;
162}
163
164early_param("nr_cpus", nrcpus);
165
152static int __init maxcpus(char *str) 166static int __init maxcpus(char *str)
153{ 167{
154 get_option(&str, &setup_max_cpus); 168 get_option(&str, &setup_max_cpus);
@@ -416,7 +430,9 @@ static noinline void __init_refok rest_init(void)
416 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); 430 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
417 numa_default_policy(); 431 numa_default_policy();
418 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); 432 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
433 rcu_read_lock();
419 kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); 434 kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
435 rcu_read_unlock();
420 unlock_kernel(); 436 unlock_kernel();
421 437
422 /* 438 /*
@@ -584,6 +600,7 @@ asmlinkage void __init start_kernel(void)
584 local_irq_disable(); 600 local_irq_disable();
585 } 601 }
586 rcu_init(); 602 rcu_init();
603 radix_tree_init();
587 /* init some links before init_ISA_irqs() */ 604 /* init some links before init_ISA_irqs() */
588 early_irq_init(); 605 early_irq_init();
589 init_IRQ(); 606 init_IRQ();
@@ -657,7 +674,6 @@ asmlinkage void __init start_kernel(void)
657 proc_caches_init(); 674 proc_caches_init();
658 buffer_init(); 675 buffer_init();
659 key_init(); 676 key_init();
660 radix_tree_init();
661 security_init(); 677 security_init();
662 vfs_caches_init(totalram_pages); 678 vfs_caches_init(totalram_pages);
663 signals_init(); 679 signals_init();