ACPI: Store valid ACPI tables passed via early initrd in reserved memblock areas
A message that is not in the archive (sent off-list or not yet received): [email protected]
Commit-ID: 53aac44c904abbad9f474f652f099de13b5c3563 Gitweb: http://git.kernel.org/tip/53aac44c904abbad9f474f652f099de13b5c3563 Author: Thomas Renninger <[email protected]> AuthorDate: Mon, 1 Oct 2012 00:23:54 +0200 Committer: H. Peter Anvin <[email protected]> CommitDate: Sun, 30 Sep 2012 18:03:23 -0700
ACPI: Store valid ACPI tables passed via early initrd in reserved memblock areas
A later patch will compare them with ACPI tables that get loaded at boot or runtime and if criteria match, a stored one is loaded.
--- arch/x86/kernel/setup.c | 2 + drivers/acpi/Kconfig | 9 ++++ drivers/acpi/osl.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 8 +++ 4 files changed, 141 insertions(+), 0 deletions(-)
arch/x86/kernel/setup.c +2 -0
@@ -941,6 +941,8 @@ void __init setup_arch(char **cmdline_p)reserve_initrd (); +acpi_initrd_override ((void *)initrd_start, initrd_end - initrd_start); +reserve_crashkernel ();vsmp_init ();
drivers/acpi/Kconfig +9 -0
@@ -261,6 +261,15 @@ config ACPI_CUSTOM_DSDT bool default ACPI_CUSTOM_DSDT_FILE != "" +config ACPI_INITRD_TABLE_OVERRIDE + bool "ACPI tables can be passed via uncompressed cpio in initrd" + default n + help + This option provides functionality to override arbitrary ACPI tables + via initrd. No functional change if no ACPI tables are passed via + initrd, therefore it's safe to say Y. + See Documentation/acpi/initrd_table_override.txt for details + config ACPI_BLACKLIST_YEAR int "Disable ACPI for systems before Jan 1st this year" if X86_32 default 0
drivers/acpi/osl.c +122 -0
128 lines not on this page · raw message
include/linux/acpi.h +8 -0
@@ -76,6 +76,14 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);typedef int (*acpi_table_entry_handler ) (struct acpi_subtable_header *header,const unsigned long end); +#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE +void acpi_initrd_override (void *data,size_t size); +#else +static inline void acpi_initrd_override (void *data,size_t size) +{ +} +#endif +char *__acpi_map_table (unsigned long phys_addr,unsigned long size);void __acpi_unmap_table (char *map,unsigned long size);int early_acpi_boot_init (void );
PATCH 1/1 ACPI: Fix build when disabled
"ACPI: Store valid ACPI tables passed via early initrd in reserved memblock areas" breaks the build if either CONFIG_ACPI or CONFIG_BLK_DEV_INITRD is disabled:
arch/x86/kernel/setup.c: In function 'setup_arch':arch/x86/kernel/setup.c:944: error: implicit declaration of function 'acpi_initrd_override'
or
arch/x86/built-in.o: In function `setup_arch':
(.init.text+0x1397): undefined reference to initrd_start' arch/x86/built-in.o: In function setup_arch':
(.init.text+0x139e): undefined reference to `initrd_end'
The dummy acpi_initrd_override() function in acpi.h isn't defined without CONFIG_ACPI and initrd_{start,end} are declared but not defined without CONFIG_BLK_DEV_INITRD.
--- arch/x86/kernel/setup.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/setup.c +2 -0
@@ -941,7 +941,9 @@ void __init setup_arch(char **cmdline_p)reserve_initrd (); +#if defined(CONFIG_ACPI ) && defined(CONFIG_BLK_DEV_INITRD )acpi_initrd_override ((void *)initrd_start, initrd_end - initrd_start); +#endif reserve_crashkernel ();
[tip:x86/acpi] ACPI: Fix build when disabled
Commit-ID: 3dfd8235002727dbd759bb0f80f8ac862f392071 Gitweb: http://git.kernel.org/tip/3dfd8235002727dbd759bb0f80f8ac862f392071 Author: David Rientjes <[email protected]> AuthorDate: Mon, 1 Oct 2012 20:38:47 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Mon, 1 Oct 2012 20:41:43 -0700
ACPI: Fix build when disabled
"ACPI: Store valid ACPI tables passed via early initrd in reserved memblock areas" breaks the build if either CONFIG_ACPI or CONFIG_BLK_DEV_INITRD is disabled:
arch/x86/kernel/setup.c: In function 'setup_arch':arch/x86/kernel/setup.c:944: error: implicit declaration of function 'acpi_initrd_override'
or
arch/x86/built-in.o: In function `setup_arch':
(.init.text+0x1397): undefined reference to initrd_start' arch/x86/built-in.o: In function setup_arch':
(.init.text+0x139e): undefined reference to `initrd_end'
The dummy acpi_initrd_override() function in acpi.h isn't defined without CONFIG_ACPI and initrd_{start,end} are declared but not defined without CONFIG_BLK_DEV_INITRD.
[ hpa: applying this as a fix, but this really should be done cleaner ]
--- arch/x86/kernel/setup.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/setup.c +2 -0
@@ -941,7 +941,9 @@ void __init setup_arch(char **cmdline_p)reserve_initrd (); +#if defined(CONFIG_ACPI ) && defined(CONFIG_BLK_DEV_INITRD )acpi_initrd_override ((void *)initrd_start, initrd_end - initrd_start); +#endif reserve_crashkernel ();