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 | |
| 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')
| -rw-r--r-- | init/Kconfig | 9 | ||||
| -rw-r--r-- | init/calibrate.c | 3 | ||||
| -rw-r--r-- | init/do_mounts.c | 4 | ||||
| -rw-r--r-- | init/do_mounts_initrd.c | 1 | ||||
| -rw-r--r-- | init/do_mounts_rd.c | 13 | ||||
| -rw-r--r-- | init/main.c | 75 |
6 files changed, 72 insertions, 33 deletions
diff --git a/init/Kconfig b/init/Kconfig index da9222d5ae97..2acd917ebf2d 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -438,15 +438,6 @@ config PREEMPT_RCU | |||
| 438 | This option enables preemptible-RCU code that is common between | 438 | This option enables preemptible-RCU code that is common between |
| 439 | the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. | 439 | the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. |
| 440 | 440 | ||
| 441 | config RCU_TRACE | ||
| 442 | bool "Enable tracing for RCU" | ||
| 443 | help | ||
| 444 | This option provides tracing in RCU which presents stats | ||
| 445 | in debugfs for debugging RCU implementation. | ||
| 446 | |||
| 447 | Say Y here if you want to enable RCU tracing | ||
| 448 | Say N if you are unsure. | ||
| 449 | |||
| 450 | config RCU_FANOUT | 441 | config RCU_FANOUT |
| 451 | int "Tree-based hierarchical RCU fanout value" | 442 | int "Tree-based hierarchical RCU fanout value" |
| 452 | range 2 64 if 64BIT | 443 | range 2 64 if 64BIT |
diff --git a/init/calibrate.c b/init/calibrate.c index 5f117ca9e069..fda0a7b0f06c 100644 --- a/init/calibrate.c +++ b/init/calibrate.c | |||
| @@ -267,7 +267,8 @@ void __cpuinit calibrate_delay(void) | |||
| 267 | 267 | ||
| 268 | if (per_cpu(cpu_loops_per_jiffy, this_cpu)) { | 268 | if (per_cpu(cpu_loops_per_jiffy, this_cpu)) { |
| 269 | lpj = per_cpu(cpu_loops_per_jiffy, this_cpu); | 269 | lpj = per_cpu(cpu_loops_per_jiffy, this_cpu); |
| 270 | pr_info("Calibrating delay loop (skipped) " | 270 | if (!printed) |
| 271 | pr_info("Calibrating delay loop (skipped) " | ||
| 271 | "already calibrated this CPU"); | 272 | "already calibrated this CPU"); |
| 272 | } else if (preset_lpj) { | 273 | } else if (preset_lpj) { |
| 273 | lpj = preset_lpj; | 274 | lpj = preset_lpj; |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 2974c8b3b351..0e93f92a0345 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
| @@ -373,8 +373,8 @@ retry: | |||
| 373 | #ifdef CONFIG_BLOCK | 373 | #ifdef CONFIG_BLOCK |
| 374 | __bdevname(ROOT_DEV, b); | 374 | __bdevname(ROOT_DEV, b); |
| 375 | #endif | 375 | #endif |
| 376 | printk("VFS: Cannot open root device \"%s\" or %s\n", | 376 | printk("VFS: Cannot open root device \"%s\" or %s: error %d\n", |
| 377 | root_device_name, b); | 377 | root_device_name, b, err); |
| 378 | printk("Please append a correct \"root=\" boot option; here are the available partitions:\n"); | 378 | printk("Please append a correct \"root=\" boot option; here are the available partitions:\n"); |
| 379 | 379 | ||
| 380 | printk_all_partitions(); | 380 | printk_all_partitions(); |
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 3098a38f3ae1..9047330c73e9 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
| 3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
| 4 | #include <linux/minix_fs.h> | 4 | #include <linux/minix_fs.h> |
| 5 | #include <linux/ext2_fs.h> | ||
| 6 | #include <linux/romfs_fs.h> | 5 | #include <linux/romfs_fs.h> |
| 7 | #include <linux/initrd.h> | 6 | #include <linux/initrd.h> |
| 8 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 887629e24c54..6212586df29a 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c | |||
| @@ -54,20 +54,19 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) | |||
| 54 | { | 54 | { |
| 55 | const int size = 512; | 55 | const int size = 512; |
| 56 | struct minix_super_block *minixsb; | 56 | struct minix_super_block *minixsb; |
| 57 | struct ext2_super_block *ext2sb; | ||
| 58 | struct romfs_super_block *romfsb; | 57 | struct romfs_super_block *romfsb; |
| 59 | struct cramfs_super *cramfsb; | 58 | struct cramfs_super *cramfsb; |
| 60 | struct squashfs_super_block *squashfsb; | 59 | struct squashfs_super_block *squashfsb; |
| 61 | int nblocks = -1; | 60 | int nblocks = -1; |
| 62 | unsigned char *buf; | 61 | unsigned char *buf; |
| 63 | const char *compress_name; | 62 | const char *compress_name; |
| 63 | unsigned long n; | ||
| 64 | 64 | ||
| 65 | buf = kmalloc(size, GFP_KERNEL); | 65 | buf = kmalloc(size, GFP_KERNEL); |
| 66 | if (!buf) | 66 | if (!buf) |
| 67 | return -ENOMEM; | 67 | return -ENOMEM; |
| 68 | 68 | ||
| 69 | minixsb = (struct minix_super_block *) buf; | 69 | minixsb = (struct minix_super_block *) buf; |
| 70 | ext2sb = (struct ext2_super_block *) buf; | ||
| 71 | romfsb = (struct romfs_super_block *) buf; | 70 | romfsb = (struct romfs_super_block *) buf; |
| 72 | cramfsb = (struct cramfs_super *) buf; | 71 | cramfsb = (struct cramfs_super *) buf; |
| 73 | squashfsb = (struct squashfs_super_block *) buf; | 72 | squashfsb = (struct squashfs_super_block *) buf; |
| @@ -150,12 +149,12 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) | |||
| 150 | } | 149 | } |
| 151 | 150 | ||
| 152 | /* Try ext2 */ | 151 | /* Try ext2 */ |
| 153 | if (ext2sb->s_magic == cpu_to_le16(EXT2_SUPER_MAGIC)) { | 152 | n = ext2_image_size(buf); |
| 153 | if (n) { | ||
| 154 | printk(KERN_NOTICE | 154 | printk(KERN_NOTICE |
| 155 | "RAMDISK: ext2 filesystem found at block %d\n", | 155 | "RAMDISK: ext2 filesystem found at block %d\n", |
| 156 | start_block); | 156 | start_block); |
| 157 | nblocks = le32_to_cpu(ext2sb->s_blocks_count) << | 157 | nblocks = n; |
| 158 | le32_to_cpu(ext2sb->s_log_block_size); | ||
| 159 | goto done; | 158 | goto done; |
| 160 | } | 159 | } |
| 161 | 160 | ||
| @@ -178,7 +177,7 @@ int __init rd_load_image(char *from) | |||
| 178 | char *buf = NULL; | 177 | char *buf = NULL; |
| 179 | unsigned short rotate = 0; | 178 | unsigned short rotate = 0; |
| 180 | decompress_fn decompressor = NULL; | 179 | decompress_fn decompressor = NULL; |
| 181 | #if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) | 180 | #if !defined(CONFIG_S390) |
| 182 | char rotator[4] = { '|' , '/' , '-' , '\\' }; | 181 | char rotator[4] = { '|' , '/' , '-' , '\\' }; |
| 183 | #endif | 182 | #endif |
| 184 | 183 | ||
| @@ -264,7 +263,7 @@ int __init rd_load_image(char *from) | |||
| 264 | } | 263 | } |
| 265 | sys_read(in_fd, buf, BLOCK_SIZE); | 264 | sys_read(in_fd, buf, BLOCK_SIZE); |
| 266 | sys_write(out_fd, buf, BLOCK_SIZE); | 265 | sys_write(out_fd, buf, BLOCK_SIZE); |
| 267 | #if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) | 266 | #if !defined(CONFIG_S390) |
| 268 | if (!(i % 16)) { | 267 | if (!(i % 16)) { |
| 269 | printk("%c\b", rotator[rotate & 0x3]); | 268 | printk("%c\b", rotator[rotate & 0x3]); |
| 270 | rotate++; | 269 | rotate++; |
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 | ||
