aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-02-16 21:40:35 -0500
committerH. Peter Anvin <hpa@zytor.com>2010-02-17 00:43:39 -0500
commit580e0ad21d6d6f932461d24b47041e3dd499c23f (patch)
tree3476c71849c0f9aa54c160b9a994bf4d211bd697 /arch/x86/kernel/e820.c
parentdd645cee7b50b61cb2d05b59eb6027679c437af6 (diff)
core: Move early_res from arch/x86 to kernel/
This makes the range reservation feature available to other architectures. -v2: add get_max_mapped, max_pfn_mapped only defined in x86... to fix PPC compiling -v3: according to hpa, add CONFIG_HAVE_EARLY_RES -v4: fix typo about EARLY_RES in config Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4B7B5723.4070009@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r--arch/x86/kernel/e820.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 36918d8463a..740b440fbd7 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -17,7 +17,6 @@
17#include <linux/firmware-map.h> 17#include <linux/firmware-map.h>
18 18
19#include <asm/e820.h> 19#include <asm/e820.h>
20#include <asm/early_res.h>
21#include <asm/proto.h> 20#include <asm/proto.h>
22#include <asm/setup.h> 21#include <asm/setup.h>
23 22
@@ -752,6 +751,15 @@ u64 __init find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align)
752{ 751{
753 return find_e820_area(start, end, size, align); 752 return find_e820_area(start, end, size, align);
754} 753}
754
755u64 __init get_max_mapped(void)
756{
757 u64 end = max_pfn_mapped;
758
759 end <<= PAGE_SHIFT;
760
761 return end;
762}
755/* 763/*
756 * Find next free range after *start 764 * Find next free range after *start
757 */ 765 */