diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c index 6bf83afd654d..3bbf93be744c 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <asm/setup.h> | 71 | #include <asm/setup.h> |
72 | #include <asm/sections.h> | 72 | #include <asm/sections.h> |
73 | #include <asm/cacheflush.h> | 73 | #include <asm/cacheflush.h> |
74 | #include <trace/kmemtrace.h> | ||
74 | 75 | ||
75 | #ifdef CONFIG_X86_LOCAL_APIC | 76 | #ifdef CONFIG_X86_LOCAL_APIC |
76 | #include <asm/smp.h> | 77 | #include <asm/smp.h> |
@@ -407,8 +408,7 @@ static void __init smp_init(void) | |||
407 | * Set up the current CPU as possible to migrate to. | 408 | * Set up the current CPU as possible to migrate to. |
408 | * The other ones will be done by cpu_up/cpu_down() | 409 | * The other ones will be done by cpu_up/cpu_down() |
409 | */ | 410 | */ |
410 | cpu = smp_processor_id(); | 411 | set_cpu_active(smp_processor_id(), true); |
411 | cpu_set(cpu, cpu_active_map); | ||
412 | 412 | ||
413 | /* FIXME: This should be done in userspace --RR */ | 413 | /* FIXME: This should be done in userspace --RR */ |
414 | for_each_present_cpu(cpu) { | 414 | for_each_present_cpu(cpu) { |
@@ -492,6 +492,11 @@ static int __init do_early_param(char *param, char *val) | |||
492 | return 0; | 492 | return 0; |
493 | } | 493 | } |
494 | 494 | ||
495 | void __init parse_early_options(char *cmdline) | ||
496 | { | ||
497 | parse_args("early options", cmdline, NULL, 0, do_early_param); | ||
498 | } | ||
499 | |||
495 | /* Arch code calls this early on, or if not, just before other parsing. */ | 500 | /* Arch code calls this early on, or if not, just before other parsing. */ |
496 | void __init parse_early_param(void) | 501 | void __init parse_early_param(void) |
497 | { | 502 | { |
@@ -503,7 +508,7 @@ void __init parse_early_param(void) | |||
503 | 508 | ||
504 | /* All fall through to do_early_param. */ | 509 | /* All fall through to do_early_param. */ |
505 | strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); | 510 | strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); |
506 | parse_args("early options", tmp_cmdline, NULL, 0, do_early_param); | 511 | parse_early_options(tmp_cmdline); |
507 | done = 1; | 512 | done = 1; |
508 | } | 513 | } |
509 | 514 | ||
@@ -649,6 +654,7 @@ asmlinkage void __init start_kernel(void) | |||
649 | enable_debug_pagealloc(); | 654 | enable_debug_pagealloc(); |
650 | cpu_hotplug_init(); | 655 | cpu_hotplug_init(); |
651 | kmem_cache_init(); | 656 | kmem_cache_init(); |
657 | kmemtrace_init(); | ||
652 | debug_objects_mem_init(); | 658 | debug_objects_mem_init(); |
653 | idr_init_cache(); | 659 | idr_init_cache(); |
654 | setup_per_cpu_pageset(); | 660 | setup_per_cpu_pageset(); |
@@ -770,6 +776,7 @@ static void __init do_basic_setup(void) | |||
770 | { | 776 | { |
771 | rcu_init_sched(); /* needed by module_init stage. */ | 777 | rcu_init_sched(); /* needed by module_init stage. */ |
772 | init_workqueues(); | 778 | init_workqueues(); |
779 | cpuset_init_smp(); | ||
773 | usermodehelper_init(); | 780 | usermodehelper_init(); |
774 | driver_init(); | 781 | driver_init(); |
775 | init_irq_proc(); | 782 | init_irq_proc(); |
@@ -794,6 +801,7 @@ static void run_init_process(char *init_filename) | |||
794 | * makes it inline to init() and it becomes part of init.text section | 801 | * makes it inline to init() and it becomes part of init.text section |
795 | */ | 802 | */ |
796 | static noinline int init_post(void) | 803 | static noinline int init_post(void) |
804 | __releases(kernel_lock) | ||
797 | { | 805 | { |
798 | /* need to finish all async __init code before freeing the memory */ | 806 | /* need to finish all async __init code before freeing the memory */ |
799 | async_synchronize_full(); | 807 | async_synchronize_full(); |
@@ -842,7 +850,7 @@ static int __init kernel_init(void * unused) | |||
842 | /* | 850 | /* |
843 | * init can run on any cpu. | 851 | * init can run on any cpu. |
844 | */ | 852 | */ |
845 | set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR); | 853 | set_cpus_allowed_ptr(current, cpu_all_mask); |
846 | /* | 854 | /* |
847 | * Tell the world that we're going to be the grim | 855 | * Tell the world that we're going to be the grim |
848 | * reaper of innocent orphaned children. | 856 | * reaper of innocent orphaned children. |
@@ -863,8 +871,6 @@ static int __init kernel_init(void * unused) | |||
863 | smp_init(); | 871 | smp_init(); |
864 | sched_init_smp(); | 872 | sched_init_smp(); |
865 | 873 | ||
866 | cpuset_init_smp(); | ||
867 | |||
868 | do_basic_setup(); | 874 | do_basic_setup(); |
869 | 875 | ||
870 | /* | 876 | /* |