diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 12:30:01 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 12:55:00 -0700 |
commit | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (patch) | |
tree | 3ba9c94ec346275fb44c4f0d1cd2537cdff8d811 /init | |
parent | a5567932fc926739e29e98487128080f40c61710 (diff) | |
parent | 48ddbe194623ae089cc0576e60363f2d2e85662a (diff) | |
download | linux-stable-959d851caa48829eb85cb85aa949fd6b4c5d5bc6.tar.gz |
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 This option enables preemptible-RCU code that is common between the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. -config RCU_TRACE - bool "Enable tracing for RCU" - help - This option provides tracing in RCU which presents stats - in debugfs for debugging RCU implementation. - - Say Y here if you want to enable RCU tracing - Say N if you are unsure. - config RCU_FANOUT int "Tree-based hierarchical RCU fanout value" 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) if (per_cpu(cpu_loops_per_jiffy, this_cpu)) { lpj = per_cpu(cpu_loops_per_jiffy, this_cpu); - pr_info("Calibrating delay loop (skipped) " + if (!printed) + pr_info("Calibrating delay loop (skipped) " "already calibrated this CPU"); } else if (preset_lpj) { 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: #ifdef CONFIG_BLOCK __bdevname(ROOT_DEV, b); #endif - printk("VFS: Cannot open root device \"%s\" or %s\n", - root_device_name, b); + printk("VFS: Cannot open root device \"%s\" or %s: error %d\n", + root_device_name, b, err); printk("Please append a correct \"root=\" boot option; here are the available partitions:\n"); 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 @@ #include <linux/kernel.h> #include <linux/fs.h> #include <linux/minix_fs.h> -#include <linux/ext2_fs.h> #include <linux/romfs_fs.h> #include <linux/initrd.h> #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) { const int size = 512; struct minix_super_block *minixsb; - struct ext2_super_block *ext2sb; struct romfs_super_block *romfsb; struct cramfs_super *cramfsb; struct squashfs_super_block *squashfsb; int nblocks = -1; unsigned char *buf; const char *compress_name; + unsigned long n; buf = kmalloc(size, GFP_KERNEL); if (!buf) return -ENOMEM; minixsb = (struct minix_super_block *) buf; - ext2sb = (struct ext2_super_block *) buf; romfsb = (struct romfs_super_block *) buf; cramfsb = (struct cramfs_super *) buf; squashfsb = (struct squashfs_super_block *) buf; @@ -150,12 +149,12 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) } /* Try ext2 */ - if (ext2sb->s_magic == cpu_to_le16(EXT2_SUPER_MAGIC)) { + n = ext2_image_size(buf); + if (n) { printk(KERN_NOTICE "RAMDISK: ext2 filesystem found at block %d\n", start_block); - nblocks = le32_to_cpu(ext2sb->s_blocks_count) << - le32_to_cpu(ext2sb->s_log_block_size); + nblocks = n; goto done; } @@ -178,7 +177,7 @@ int __init rd_load_image(char *from) char *buf = NULL; unsigned short rotate = 0; decompress_fn decompressor = NULL; -#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) +#if !defined(CONFIG_S390) char rotator[4] = { '|' , '/' , '-' , '\\' }; #endif @@ -264,7 +263,7 @@ int __init rd_load_image(char *from) } sys_read(in_fd, buf, BLOCK_SIZE); sys_write(out_fd, buf, BLOCK_SIZE); -#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) +#if !defined(CONFIG_S390) if (!(i % 16)) { printk("%c\b", rotator[rotate & 0x3]); 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); extern void sbus_init(void); extern void prio_tree_init(void); extern void radix_tree_init(void); -extern void free_initmem(void); #ifndef CONFIG_DEBUG_RODATA static inline void mark_rodata_ro(void) { } #endif @@ -374,11 +373,8 @@ static noinline void __init_refok rest_init(void) * at least once to get things moving: */ init_idle_bootup_task(current); - preempt_enable_no_resched(); - schedule(); - + schedule_preempt_disabled(); /* Call into cpu_idle with preempt disabled */ - preempt_disable(); cpu_idle(); } @@ -403,7 +399,7 @@ static int __init do_early_param(char *param, char *val) void __init parse_early_options(char *cmdline) { - parse_args("early options", cmdline, NULL, 0, do_early_param); + parse_args("early options", cmdline, NULL, 0, 0, 0, do_early_param); } /* 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) static void __init mm_init(void) { /* - * page_cgroup requires countinous pages as memmap - * and it's bigger than MAX_ORDER unless SPARSEMEM. + * page_cgroup requires contiguous pages, + * bigger than MAX_ORDER unless SPARSEMEM. */ page_cgroup_init_flatmem(); mem_init(); @@ -506,7 +502,7 @@ asmlinkage void __init start_kernel(void) parse_early_param(); parse_args("Booting kernel", static_command_line, __start___param, __stop___param - __start___param, - &unknown_bootoption); + 0, 0, &unknown_bootoption); jump_label_init(); @@ -702,16 +698,69 @@ int __init_or_module do_one_initcall(initcall_t fn) } -extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; +extern initcall_t __initcall_start[]; +extern initcall_t __initcall0_start[]; +extern initcall_t __initcall1_start[]; +extern initcall_t __initcall2_start[]; +extern initcall_t __initcall3_start[]; +extern initcall_t __initcall4_start[]; +extern initcall_t __initcall5_start[]; +extern initcall_t __initcall6_start[]; +extern initcall_t __initcall7_start[]; +extern initcall_t __initcall_end[]; + +static initcall_t *initcall_levels[] __initdata = { + __initcall0_start, + __initcall1_start, + __initcall2_start, + __initcall3_start, + __initcall4_start, + __initcall5_start, + __initcall6_start, + __initcall7_start, + __initcall_end, +}; + +static char *initcall_level_names[] __initdata = { + "early parameters", + "core parameters", + "postcore parameters", + "arch parameters", + "subsys parameters", + "fs parameters", + "device parameters", + "late parameters", +}; + +static int __init ignore_unknown_bootoption(char *param, char *val) +{ + return 0; +} -static void __init do_initcalls(void) +static void __init do_initcall_level(int level) { + extern const struct kernel_param __start___param[], __stop___param[]; initcall_t *fn; - for (fn = __early_initcall_end; fn < __initcall_end; fn++) + strcpy(static_command_line, saved_command_line); + parse_args(initcall_level_names[level], + static_command_line, __start___param, + __stop___param - __start___param, + level, level, + ignore_unknown_bootoption); + + for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) do_one_initcall(*fn); } +static void __init do_initcalls(void) +{ + int level; + + for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) + do_initcall_level(level); +} + /* * Ok, the machine is now initialized. None of the devices * have been touched yet, but the CPU subsystem is up and @@ -735,7 +784,7 @@ static void __init do_pre_smp_initcalls(void) { initcall_t *fn; - for (fn = __initcall_start; fn < __early_initcall_end; fn++) + for (fn = __initcall_start; fn < __initcall0_start; fn++) do_one_initcall(*fn); } |