|
@@ -70,6 +70,8 @@
|
|
|
#include <linux/perf_event.h>
|
|
|
#include <linux/file.h>
|
|
|
#include <linux/ptrace.h>
|
|
|
+#include <linux/blkdev.h>
|
|
|
+#include <linux/elevator.h>
|
|
|
|
|
|
#include <asm/io.h>
|
|
|
#include <asm/bugs.h>
|
|
@@ -794,6 +796,17 @@ static void __init do_pre_smp_initcalls(void)
|
|
|
do_one_initcall(*fn);
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * This function requests modules which should be loaded by default and is
|
|
|
+ * called twice right after initrd is mounted and right before init is
|
|
|
+ * exec'd. If such modules are on either initrd or rootfs, they will be
|
|
|
+ * loaded before control is passed to userland.
|
|
|
+ */
|
|
|
+void __init load_default_modules(void)
|
|
|
+{
|
|
|
+ load_default_elevator_module();
|
|
|
+}
|
|
|
+
|
|
|
static int run_init_process(const char *init_filename)
|
|
|
{
|
|
|
argv_init[0] = init_filename;
|
|
@@ -898,4 +911,7 @@ static void __init kernel_init_freeable(void)
|
|
|
* we're essentially up and running. Get rid of the
|
|
|
* initmem segments and start the user-mode stuff..
|
|
|
*/
|
|
|
+
|
|
|
+ /* rootfs is available now, try loading default modules */
|
|
|
+ load_default_modules();
|
|
|
}
|