diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 15:30:01 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 15:55:00 -0400 |
commit | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (patch) | |
tree | 3ba9c94ec346275fb44c4f0d1cd2537cdff8d811 /init/main.c | |
parent | a5567932fc926739e29e98487128080f40c61710 (diff) | |
parent | 48ddbe194623ae089cc0576e60363f2d2e85662a (diff) |
Merge branch 'for-3.5' of ../cgroup into block/for-3.5/core-merged
cgroup/for-3.5 contains the following changes which blk-cgroup needs
to proceed with the on-going cleanup.
* Dynamic addition and removal of cftypes to make config/stat file
handling modular for policies.
* cgroup removal update to not wait for css references to drain to fix
blkcg removal hang caused by cfq caching cfqgs.
Pull in cgroup/for-3.5 into block/for-3.5/core. This causes the
following conflicts in block/blk-cgroup.c.
* 761b3ef50e "cgroup: remove cgroup_subsys argument from callbacks"
conflicts with blkiocg_pre_destroy() addition and blkiocg_attach()
removal. Resolved by removing @subsys from all subsys methods.
* 676f7c8f84 "cgroup: relocate cftype and cgroup_subsys definitions in
controllers" conflicts with ->pre_destroy() and ->attach() updates
and removal of modular config. Resolved by dropping forward
declarations of the methods and applying updates to the relocated
blkio_subsys.
* 4baf6e3325 "cgroup: convert all non-memcg controllers to the new
cftype interface" builds upon the previous item. Resolved by adding
->base_cftypes to the relocated blkio_subsys.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 75 |
1 files changed, 62 insertions, 13 deletions
diff --git a/init/main.c b/init/main.c index ff49a6dacfbb..9d454f09f3b1 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -87,7 +87,6 @@ extern void mca_init(void); | |||
87 | extern void sbus_init(void); | 87 | extern void sbus_init(void); |
88 | extern void prio_tree_init(void); | 88 | extern void prio_tree_init(void); |
89 | extern void radix_tree_init(void); | 89 | extern void radix_tree_init(void); |
90 | extern void free_initmem(void); | ||
91 | #ifndef CONFIG_DEBUG_RODATA | 90 | #ifndef CONFIG_DEBUG_RODATA |
92 | static inline void mark_rodata_ro(void) { } | 91 | static inline void mark_rodata_ro(void) { } |
93 | #endif | 92 | #endif |
@@ -374,11 +373,8 @@ static noinline void __init_refok rest_init(void) | |||
374 | * at least once to get things moving: | 373 | * at least once to get things moving: |
375 | */ | 374 | */ |
376 | init_idle_bootup_task(current); | 375 | init_idle_bootup_task(current); |
377 | preempt_enable_no_resched(); | 376 | schedule_preempt_disabled(); |
378 | schedule(); | ||
379 | |||
380 | /* Call into cpu_idle with preempt disabled */ | 377 | /* Call into cpu_idle with preempt disabled */ |
381 | preempt_disable(); | ||
382 | cpu_idle(); | 378 | cpu_idle(); |
383 | } | 379 | } |
384 | 380 | ||
@@ -403,7 +399,7 @@ static int __init do_early_param(char *param, char *val) | |||
403 | 399 | ||
404 | void __init parse_early_options(char *cmdline) | 400 | void __init parse_early_options(char *cmdline) |
405 | { | 401 | { |
406 | parse_args("early options", cmdline, NULL, 0, do_early_param); | 402 | parse_args("early options", cmdline, NULL, 0, 0, 0, do_early_param); |
407 | } | 403 | } |
408 | 404 | ||
409 | /* Arch code calls this early on, or if not, just before other parsing. */ | 405 | /* Arch code calls this early on, or if not, just before other parsing. */ |
@@ -449,8 +445,8 @@ void __init __weak thread_info_cache_init(void) | |||
449 | static void __init mm_init(void) | 445 | static void __init mm_init(void) |
450 | { | 446 | { |
451 | /* | 447 | /* |
452 | * page_cgroup requires countinous pages as memmap | 448 | * page_cgroup requires contiguous pages, |
453 | * and it's bigger than MAX_ORDER unless SPARSEMEM. | 449 | * bigger than MAX_ORDER unless SPARSEMEM. |
454 | */ | 450 | */ |
455 | page_cgroup_init_flatmem(); | 451 | page_cgroup_init_flatmem(); |
456 | mem_init(); | 452 | mem_init(); |
@@ -506,7 +502,7 @@ asmlinkage void __init start_kernel(void) | |||
506 | parse_early_param(); | 502 | parse_early_param(); |
507 | parse_args("Booting kernel", static_command_line, __start___param, | 503 | parse_args("Booting kernel", static_command_line, __start___param, |
508 | __stop___param - __start___param, | 504 | __stop___param - __start___param, |
509 | &unknown_bootoption); | 505 | 0, 0, &unknown_bootoption); |
510 | 506 | ||
511 | jump_label_init(); | 507 | jump_label_init(); |
512 | 508 | ||
@@ -702,16 +698,69 @@ int __init_or_module do_one_initcall(initcall_t fn) | |||
702 | } | 698 | } |
703 | 699 | ||
704 | 700 | ||
705 | extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; | 701 | extern initcall_t __initcall_start[]; |
702 | extern initcall_t __initcall0_start[]; | ||
703 | extern initcall_t __initcall1_start[]; | ||
704 | extern initcall_t __initcall2_start[]; | ||
705 | extern initcall_t __initcall3_start[]; | ||
706 | extern initcall_t __initcall4_start[]; | ||
707 | extern initcall_t __initcall5_start[]; | ||
708 | extern initcall_t __initcall6_start[]; | ||
709 | extern initcall_t __initcall7_start[]; | ||
710 | extern initcall_t __initcall_end[]; | ||
711 | |||
712 | static initcall_t *initcall_levels[] __initdata = { | ||
713 | __initcall0_start, | ||
714 | __initcall1_start, | ||
715 | __initcall2_start, | ||
716 | __initcall3_start, | ||
717 | __initcall4_start, | ||
718 | __initcall5_start, | ||
719 | __initcall6_start, | ||
720 | __initcall7_start, | ||
721 | __initcall_end, | ||
722 | }; | ||
723 | |||
724 | static char *initcall_level_names[] __initdata = { | ||
725 | "early parameters", | ||
726 | "core parameters", | ||
727 | "postcore parameters", | ||
728 | "arch parameters", | ||
729 | "subsys parameters", | ||
730 | "fs parameters", | ||
731 | "device parameters", | ||
732 | "late parameters", | ||
733 | }; | ||
734 | |||
735 | static int __init ignore_unknown_bootoption(char *param, char *val) | ||
736 | { | ||
737 | return 0; | ||
738 | } | ||
706 | 739 | ||
707 | static void __init do_initcalls(void) | 740 | static void __init do_initcall_level(int level) |
708 | { | 741 | { |
742 | extern const struct kernel_param __start___param[], __stop___param[]; | ||
709 | initcall_t *fn; | 743 | initcall_t *fn; |
710 | 744 | ||
711 | for (fn = __early_initcall_end; fn < __initcall_end; fn++) | 745 | strcpy(static_command_line, saved_command_line); |
746 | parse_args(initcall_level_names[level], | ||
747 | static_command_line, __start___param, | ||
748 | __stop___param - __start___param, | ||
749 | level, level, | ||
750 | ignore_unknown_bootoption); | ||
751 | |||
752 | for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) | ||
712 | do_one_initcall(*fn); | 753 | do_one_initcall(*fn); |
713 | } | 754 | } |
714 | 755 | ||
756 | static void __init do_initcalls(void) | ||
757 | { | ||
758 | int level; | ||
759 | |||
760 | for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) | ||
761 | do_initcall_level(level); | ||
762 | } | ||
763 | |||
715 | /* | 764 | /* |
716 | * Ok, the machine is now initialized. None of the devices | 765 | * Ok, the machine is now initialized. None of the devices |
717 | * have been touched yet, but the CPU subsystem is up and | 766 | * have been touched yet, but the CPU subsystem is up and |
@@ -735,7 +784,7 @@ static void __init do_pre_smp_initcalls(void) | |||
735 | { | 784 | { |
736 | initcall_t *fn; | 785 | initcall_t *fn; |
737 | 786 | ||
738 | for (fn = __initcall_start; fn < __early_initcall_end; fn++) | 787 | for (fn = __initcall_start; fn < __initcall0_start; fn++) |
739 | do_one_initcall(*fn); | 788 | do_one_initcall(*fn); |
740 | } | 789 | } |
741 | 790 | ||