diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-25 01:14:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:10:38 -0400 |
commit | c987d12f8455b19b3b057d63bac3de161bd809fc (patch) | |
tree | eb42d14516ea0d24d023d00ed0100cbee42df28c /arch/x86/mm/init_64.c | |
parent | f47f9d538ecc938bed589e9d39ad7b454f3b506c (diff) |
x86: remove end_pfn in 64bit
and use max_pfn directly.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 6eced2f10734..d5d4b04d48a4 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -49,11 +49,6 @@ | |||
49 | #include <asm/cacheflush.h> | 49 | #include <asm/cacheflush.h> |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * PFN of last memory page. | ||
53 | */ | ||
54 | unsigned long end_pfn; | ||
55 | |||
56 | /* | ||
57 | * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries. | 52 | * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries. |
58 | * The direct mapping extends to max_pfn_mapped, so that we can directly access | 53 | * The direct mapping extends to max_pfn_mapped, so that we can directly access |
59 | * apertures, ACPI and other tables without having to play with fixmaps. | 54 | * apertures, ACPI and other tables without having to play with fixmaps. |
@@ -586,9 +581,9 @@ void __init paging_init(void) | |||
586 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 581 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
587 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; | 582 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; |
588 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; | 583 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; |
589 | max_zone_pfns[ZONE_NORMAL] = end_pfn; | 584 | max_zone_pfns[ZONE_NORMAL] = max_pfn; |
590 | 585 | ||
591 | memory_present(0, 0, end_pfn); | 586 | memory_present(0, 0, max_pfn); |
592 | sparse_init(); | 587 | sparse_init(); |
593 | free_area_init_nodes(max_zone_pfns); | 588 | free_area_init_nodes(max_zone_pfns); |
594 | } | 589 | } |
@@ -670,8 +665,8 @@ void __init mem_init(void) | |||
670 | #else | 665 | #else |
671 | totalram_pages = free_all_bootmem(); | 666 | totalram_pages = free_all_bootmem(); |
672 | #endif | 667 | #endif |
673 | reservedpages = end_pfn - totalram_pages - | 668 | reservedpages = max_pfn - totalram_pages - |
674 | absent_pages_in_range(0, end_pfn); | 669 | absent_pages_in_range(0, max_pfn); |
675 | after_bootmem = 1; | 670 | after_bootmem = 1; |
676 | 671 | ||
677 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | 672 | codesize = (unsigned long) &_etext - (unsigned long) &_text; |
@@ -690,7 +685,7 @@ void __init mem_init(void) | |||
690 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " | 685 | printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " |
691 | "%ldk reserved, %ldk data, %ldk init)\n", | 686 | "%ldk reserved, %ldk data, %ldk init)\n", |
692 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | 687 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |
693 | end_pfn << (PAGE_SHIFT-10), | 688 | max_pfn << (PAGE_SHIFT-10), |
694 | codesize >> 10, | 689 | codesize >> 10, |
695 | reservedpages << (PAGE_SHIFT-10), | 690 | reservedpages << (PAGE_SHIFT-10), |
696 | datasize >> 10, | 691 | datasize >> 10, |
@@ -784,7 +779,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len, | |||
784 | #endif | 779 | #endif |
785 | unsigned long pfn = phys >> PAGE_SHIFT; | 780 | unsigned long pfn = phys >> PAGE_SHIFT; |
786 | 781 | ||
787 | if (pfn >= end_pfn) { | 782 | if (pfn >= max_pfn) { |
788 | /* | 783 | /* |
789 | * This can happen with kdump kernels when accessing | 784 | * This can happen with kdump kernels when accessing |
790 | * firmware tables: | 785 | * firmware tables: |