aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /init
parentee673eaa72d8d185012b1027a05e25aba18c267f (diff)
parent8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff)
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig10
-rw-r--r--init/do_mounts.c4
-rw-r--r--init/do_mounts_md.c40
-rw-r--r--init/main.c9
4 files changed, 39 insertions, 24 deletions
diff --git a/init/Kconfig b/init/Kconfig
index c11da38837e5..8a8e2d00c40e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -779,16 +779,6 @@ config MARKERS
779 779
780source "arch/Kconfig" 780source "arch/Kconfig"
781 781
782config PROC_PAGE_MONITOR
783 default y
784 depends on PROC_FS && MMU
785 bool "Enable /proc page monitoring" if EMBEDDED
786 help
787 Various /proc files exist to monitor process memory utilization:
788 /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap,
789 /proc/kpagecount, and /proc/kpageflags. Disabling these
790 interfaces will reduce the size of the kernel by approximately 4kb.
791
792endmenu # General setup 782endmenu # General setup
793 783
794config HAVE_GENERIC_DMA_COHERENT 784config HAVE_GENERIC_DMA_COHERENT
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 3715feb8446d..d055b1914c3d 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -263,6 +263,10 @@ retry:
263 printk("Please append a correct \"root=\" boot option; here are the available partitions:\n"); 263 printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
264 264
265 printk_all_partitions(); 265 printk_all_partitions();
266#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
267 printk("DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify "
268 "explicit textual name for \"root=\" boot option.\n");
269#endif
266 panic("VFS: Unable to mount root fs on %s", b); 270 panic("VFS: Unable to mount root fs on %s", b);
267 } 271 }
268 272
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 693d24694a6c..48b3fadd83ed 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -12,7 +12,12 @@
12 * The code for that is here. 12 * The code for that is here.
13 */ 13 */
14 14
15static int __initdata raid_noautodetect, raid_autopart; 15#ifdef CONFIG_MD_AUTODETECT
16static int __initdata raid_noautodetect;
17#else
18static int __initdata raid_noautodetect=1;
19#endif
20static int __initdata raid_autopart;
16 21
17static struct { 22static struct {
18 int minor; 23 int minor;
@@ -252,6 +257,8 @@ static int __init raid_setup(char *str)
252 257
253 if (!strncmp(str, "noautodetect", wlen)) 258 if (!strncmp(str, "noautodetect", wlen))
254 raid_noautodetect = 1; 259 raid_noautodetect = 1;
260 if (!strncmp(str, "autodetect", wlen))
261 raid_noautodetect = 0;
255 if (strncmp(str, "partitionable", wlen)==0) 262 if (strncmp(str, "partitionable", wlen)==0)
256 raid_autopart = 1; 263 raid_autopart = 1;
257 if (strncmp(str, "part", wlen)==0) 264 if (strncmp(str, "part", wlen)==0)
@@ -264,17 +271,32 @@ static int __init raid_setup(char *str)
264__setup("raid=", raid_setup); 271__setup("raid=", raid_setup);
265__setup("md=", md_setup); 272__setup("md=", md_setup);
266 273
274static void autodetect_raid(void)
275{
276 int fd;
277
278 /*
279 * Since we don't want to detect and use half a raid array, we need to
280 * wait for the known devices to complete their probing
281 */
282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
284 while (driver_probe_done() < 0)
285 msleep(100);
286 fd = sys_open("/dev/md0", 0, 0);
287 if (fd >= 0) {
288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
289 sys_close(fd);
290 }
291}
292
267void __init md_run_setup(void) 293void __init md_run_setup(void)
268{ 294{
269 create_dev("/dev/md0", MKDEV(MD_MAJOR, 0)); 295 create_dev("/dev/md0", MKDEV(MD_MAJOR, 0));
296
270 if (raid_noautodetect) 297 if (raid_noautodetect)
271 printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); 298 printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n");
272 else { 299 else
273 int fd = sys_open("/dev/md0", 0, 0); 300 autodetect_raid();
274 if (fd >= 0) {
275 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
276 sys_close(fd);
277 }
278 }
279 md_setup_drive(); 301 md_setup_drive();
280} 302}
diff --git a/init/main.c b/init/main.c
index f6f7042331dc..27f6bf6108e9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -708,7 +708,7 @@ int do_one_initcall(initcall_t fn)
708 int result; 708 int result;
709 709
710 if (initcall_debug) { 710 if (initcall_debug) {
711 print_fn_descriptor_symbol("calling %s\n", fn); 711 printk("calling %pF @ %i\n", fn, task_pid_nr(current));
712 t0 = ktime_get(); 712 t0 = ktime_get();
713 } 713 }
714 714
@@ -718,8 +718,8 @@ int do_one_initcall(initcall_t fn)
718 t1 = ktime_get(); 718 t1 = ktime_get();
719 delta = ktime_sub(t1, t0); 719 delta = ktime_sub(t1, t0);
720 720
721 print_fn_descriptor_symbol("initcall %s", fn); 721 printk("initcall %pF returned %d after %Ld msecs\n",
722 printk(" returned %d after %Ld msecs\n", result, 722 fn, result,
723 (unsigned long long) delta.tv64 >> 20); 723 (unsigned long long) delta.tv64 >> 20);
724 } 724 }
725 725
@@ -737,8 +737,7 @@ int do_one_initcall(initcall_t fn)
737 local_irq_enable(); 737 local_irq_enable();
738 } 738 }
739 if (msgbuf[0]) { 739 if (msgbuf[0]) {
740 print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); 740 printk("initcall %pF returned with %s\n", fn, msgbuf);
741 printk(" returned with %s\n", msgbuf);
742 } 741 }
743 742
744 return result; 743 return result;