diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-08-25 13:39:17 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-08-27 11:13:47 -0700 |
commit | a9ce6bc15100023b411f8117e53a016d61889800 (patch) | |
tree | c9cb1468fde867fd9bfeb0cb33ffe994b0720aaa /arch/x86/kernel/trampoline.c | |
parent | 72d7c3b33c980843e756681fb4867dc1efd62a76 (diff) |
x86, memblock: Replace e820_/_early string with memblock_
1.include linux/memblock.h directly. so later could reduce e820.h reference.
2 this patch is done by sed scripts mainly
-v2: use MEMBLOCK_ERROR instead of -1ULL or -1UL
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/trampoline.c')
-rw-r--r-- | arch/x86/kernel/trampoline.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/trampoline.c b/arch/x86/kernel/trampoline.c index c652ef62742..7c2102c2aad 100644 --- a/arch/x86/kernel/trampoline.c +++ b/arch/x86/kernel/trampoline.c @@ -1,7 +1,7 @@ #include <linux/io.h> +#include <linux/memblock.h> #include <asm/trampoline.h> -#include <asm/e820.h> #if defined(CONFIG_X86_64) && defined(CONFIG_ACPI_SLEEP) #define __trampinit @@ -16,15 +16,15 @@ unsigned char *__trampinitdata trampoline_base; void __init reserve_trampoline_memory(void) { - unsigned long mem; + phys_addr_t mem; /* Has to be in very low memory so we can execute real-mode AP code. */ - mem = find_e820_area(0, 1<<20, TRAMPOLINE_SIZE, PAGE_SIZE); - if (mem == -1L) + mem = memblock_find_in_range(0, 1<<20, TRAMPOLINE_SIZE, PAGE_SIZE); + if (mem == MEMBLOCK_ERROR) panic("Cannot allocate trampoline\n"); trampoline_base = __va(mem); - reserve_early(mem, mem + TRAMPOLINE_SIZE, "TRAMPOLINE"); + memblock_x86_reserve_range(mem, mem + TRAMPOLINE_SIZE, "TRAMPOLINE"); } /* |