summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMarkus Gaugusch <dsdt@gaugusch.at>2008-02-05 00:04:06 +0100
committerLen Brown <len.brown@intel.com>2008-02-06 22:07:41 -0500
commit71fc47a9adf8ee89e5c96a47222915c5485ac437 (patch)
treea2eaefbb703dde933a9726eae7e6399761d40136 /init
parent488b5ec871191359b9b79262a3d48456dae7ea5f (diff)
downloadlinux-stable-71fc47a9adf8ee89e5c96a47222915c5485ac437.tar.gz
linux-stable-71fc47a9adf8ee89e5c96a47222915c5485ac437.tar.bz2
linux-stable-71fc47a9adf8ee89e5c96a47222915c5485ac437.zip
ACPI: basic initramfs DSDT override support
The basics of DSDT from initramfs. In case this option is selected, populate_rootfs() is called a bit earlier to have the initramfs content available during ACPI initialization. This is a very similar path to the one available at http://gaugusch.at/kernel.shtml but with some update in the documentation, default set to No and the change of populate_rootfs() the "Jeff Mahony way" (which avoids reading the initramfs twice). Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'init')
-rw-r--r--init/initramfs.c8
-rw-r--r--init/main.c7
2 files changed, 14 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index d53fee8d8604..c0b1e0533d80 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -538,7 +538,7 @@ skip:
initrd_end = 0;
}
-static int __init populate_rootfs(void)
+int __init populate_rootfs(void)
{
char *err = unpack_to_rootfs(__initramfs_start,
__initramfs_end - __initramfs_start, 0);
@@ -577,4 +577,10 @@ static int __init populate_rootfs(void)
}
return 0;
}
+#ifndef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+/*
+ * if this option is enabled, populate_rootfs() is called _earlier_ in the
+ * boot sequence. This insures that the ACPI initialisation can find the file.
+ */
rootfs_initcall(populate_rootfs);
+#endif
diff --git a/init/main.c b/init/main.c
index c691f5f7fc27..2a78932f6c07 100644
--- a/init/main.c
+++ b/init/main.c
@@ -102,6 +102,12 @@ static inline void mark_rodata_ro(void) { }
extern void tc_init(void);
#endif
+#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+extern int populate_rootfs(void);
+#else
+static inline void populate_rootfs(void) {}
+#endif
+
enum system_states system_state;
EXPORT_SYMBOL(system_state);
@@ -648,6 +654,7 @@ asmlinkage void __init start_kernel(void)
check_bugs();
+ populate_rootfs(); /* For DSDT override from initramfs */
acpi_early_init(); /* before LAPIC and SMP init */
/* Do the rest non-__init'ed, we're now alive */