aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-generic/vmlinux.lds.h1
-rw-r--r--include/linux/init.h1
-rw-r--r--init/initramfs.c6
-rw-r--r--init/main.c7
4 files changed, 6 insertions, 9 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6e9fcebbf89f..7437ccaada77 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -242,6 +242,7 @@
242 *(.initcall4s.init) \ 242 *(.initcall4s.init) \
243 *(.initcall5.init) \ 243 *(.initcall5.init) \
244 *(.initcall5s.init) \ 244 *(.initcall5s.init) \
245 *(.initcallrootfs.init) \
245 *(.initcall6.init) \ 246 *(.initcall6.init) \
246 *(.initcall6s.init) \ 247 *(.initcall6s.init) \
247 *(.initcall7.init) \ 248 *(.initcall7.init) \
diff --git a/include/linux/init.h b/include/linux/init.h
index 5eb5d24b7680..5a593a1dec1e 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -111,6 +111,7 @@ extern void setup_arch(char **);
111#define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) 111#define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s)
112#define fs_initcall(fn) __define_initcall("5",fn,5) 112#define fs_initcall(fn) __define_initcall("5",fn,5)
113#define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) 113#define fs_initcall_sync(fn) __define_initcall("5s",fn,5s)
114#define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs)
114#define device_initcall(fn) __define_initcall("6",fn,6) 115#define device_initcall(fn) __define_initcall("6",fn,6)
115#define device_initcall_sync(fn) __define_initcall("6s",fn,6s) 116#define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
116#define late_initcall(fn) __define_initcall("7",fn,7) 117#define late_initcall(fn) __define_initcall("7",fn,7)
diff --git a/init/initramfs.c b/init/initramfs.c
index 85f04037ade1..4fa0f7977de1 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -526,7 +526,7 @@ static void __init free_initrd(void)
526 526
527#endif 527#endif
528 528
529void __init populate_rootfs(void) 529static int __init populate_rootfs(void)
530{ 530{
531 char *err = unpack_to_rootfs(__initramfs_start, 531 char *err = unpack_to_rootfs(__initramfs_start,
532 __initramfs_end - __initramfs_start, 0); 532 __initramfs_end - __initramfs_start, 0);
@@ -544,7 +544,7 @@ void __init populate_rootfs(void)
544 unpack_to_rootfs((char *)initrd_start, 544 unpack_to_rootfs((char *)initrd_start,
545 initrd_end - initrd_start, 0); 545 initrd_end - initrd_start, 0);
546 free_initrd(); 546 free_initrd();
547 return; 547 return 0;
548 } 548 }
549 printk("it isn't (%s); looks like an initrd\n", err); 549 printk("it isn't (%s); looks like an initrd\n", err);
550 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); 550 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
@@ -565,4 +565,6 @@ void __init populate_rootfs(void)
565#endif 565#endif
566 } 566 }
567#endif 567#endif
568 return 0;
568} 569}
570rootfs_initcall(populate_rootfs);
diff --git a/init/main.c b/init/main.c
index fcd9ddc3ccf5..e3f0bb20b4dd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -94,7 +94,6 @@ extern void pidmap_init(void);
94extern void prio_tree_init(void); 94extern void prio_tree_init(void);
95extern void radix_tree_init(void); 95extern void radix_tree_init(void);
96extern void free_initmem(void); 96extern void free_initmem(void);
97extern void populate_rootfs(void);
98extern void driver_init(void); 97extern void driver_init(void);
99extern void prepare_namespace(void); 98extern void prepare_namespace(void);
100#ifdef CONFIG_ACPI 99#ifdef CONFIG_ACPI
@@ -745,12 +744,6 @@ static int init(void * unused)
745 744
746 cpuset_init_smp(); 745 cpuset_init_smp();
747 746
748 /*
749 * Do this before initcalls, because some drivers want to access
750 * firmware files.
751 */
752 populate_rootfs();
753
754 do_basic_setup(); 747 do_basic_setup();
755 748
756 /* 749 /*