summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r--arch/x86/kernel/e820.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index ac5e9ebf70ea..a706e9057ba5 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -612,6 +612,17 @@ void __init free_early(u64 start, u64 end)
early_res[j - 1].end = 0;
}
+int __init page_is_reserved_early(unsigned long pagenr)
+{
+ u64 start = (u64)pagenr << PAGE_SHIFT;
+ int i;
+ struct early_res *r;
+
+ i = find_overlapped_early(start, start + PAGE_SIZE);
+ r = &early_res[i];
+ return (i < MAX_EARLY_RES && r->end);
+}
+
void __init early_res_to_bootmem(u64 start, u64 end)
{
int i;