diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/e820.c | 11 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ac5e9ebf70e..a706e9057ba 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) | |||
612 | early_res[j - 1].end = 0; | 612 | early_res[j - 1].end = 0; |
613 | } | 613 | } |
614 | 614 | ||
615 | int __init page_is_reserved_early(unsigned long pagenr) | ||
616 | { | ||
617 | u64 start = (u64)pagenr << PAGE_SHIFT; | ||
618 | int i; | ||
619 | struct early_res *r; | ||
620 | |||
621 | i = find_overlapped_early(start, start + PAGE_SIZE); | ||
622 | r = &early_res[i]; | ||
623 | return (i < MAX_EARLY_RES && r->end); | ||
624 | } | ||
625 | |||
615 | void __init early_res_to_bootmem(u64 start, u64 end) | 626 | void __init early_res_to_bootmem(u64 start, u64 end) |
616 | { | 627 | { |
617 | int i; | 628 | int i; |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index ec30d10154b..0e7bb5e8167 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -289,7 +289,8 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base) | |||
289 | 289 | ||
290 | void __init add_one_highpage_init(struct page *page, int pfn, int bad_ppro) | 290 | void __init add_one_highpage_init(struct page *page, int pfn, int bad_ppro) |
291 | { | 291 | { |
292 | if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) { | 292 | if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn)) && |
293 | !page_is_reserved_early(pfn)) { | ||
293 | ClearPageReserved(page); | 294 | ClearPageReserved(page); |
294 | init_page_count(page); | 295 | init_page_count(page); |
295 | __free_page(page); | 296 | __free_page(page); |