diff options
author | Thomas Renninger <trenn@suse.de> | 2012-09-30 18:23:53 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-09-30 21:03:13 -0400 |
commit | 8e30524dcc0d0ac1a18a5cee482b9d9cde3cb332 (patch) | |
tree | ad5e19dfd62d9ebf0e4ce61b6947e53df1bc4d00 | |
parent | e6459606b04e6385ccd3c2060fc10f78a92c7700 (diff) |
x86, acpi: Introduce x86 arch specific arch_reserve_mem_area() for e820 handling
This is needed for ACPI table overriding via initrd. Beside reserving
memblocks, X86 also requires to flag the memory area to E820_RESERVED or
E820_ACPI in the e820 mappings to be able to io(re)map it later.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Link: http://lkml.kernel.org/r/1349043837-22659-3-git-send-email-trenn@suse.de
Cc: Len Brown <lenb@kernel.org>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 6 | ||||
-rw-r--r-- | include/linux/acpi.h | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index b2297e58c6ed..6b75777c0a8d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1700,3 +1700,9 @@ int __acpi_release_global_lock(unsigned int *lock) | |||
1700 | } while (unlikely (val != old)); | 1700 | } while (unlikely (val != old)); |
1701 | return old & 0x1; | 1701 | return old & 0x1; |
1702 | } | 1702 | } |
1703 | |||
1704 | void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size) | ||
1705 | { | ||
1706 | e820_add_region(addr, size, E820_ACPI); | ||
1707 | update_e820(); | ||
1708 | } | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4f2a76224509..946fd1ea79ff 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -426,6 +426,14 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, | |||
426 | 426 | ||
427 | acpi_status acpi_os_prepare_sleep(u8 sleep_state, | 427 | acpi_status acpi_os_prepare_sleep(u8 sleep_state, |
428 | u32 pm1a_control, u32 pm1b_control); | 428 | u32 pm1a_control, u32 pm1b_control); |
429 | #if CONFIG_X86 | ||
430 | void arch_reserve_mem_area(acpi_physical_address addr, size_t size); | ||
431 | #else | ||
432 | static inline void arch_reserve_mem_area(acpi_physical_address addr, | ||
433 | size_t size) | ||
434 | { | ||
435 | } | ||
436 | #endif /* CONFIG_X86 */ | ||
429 | #else | 437 | #else |
430 | #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) | 438 | #define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) |
431 | #endif | 439 | #endif |