x86: reserve highmem pages via reserve_early
This patch makes early reserved highmem pages become reserved pages. This can be used for highmem pages allocated by bootloader such as EFI memory map, linked list of setup_data, etc. Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: andi@firstfloor.org Cc: mingo@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Thomas Gleixner

parent
d3fbe5ea95
commit
d0ec2c6f2c
@@ -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;
|
||||
|
Reference in New Issue
Block a user