aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init_64.c17
-rw-r--r--arch/x86/mm/k8topology_64.c4
-rw-r--r--arch/x86/mm/numa_64.c4
-rw-r--r--arch/x86/mm/srat_64.c2
4 files changed, 11 insertions, 16 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 */
54unsigned 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:
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c
index 317573ec9256..41f1b5c00a1d 100644
--- a/arch/x86/mm/k8topology_64.c
+++ b/arch/x86/mm/k8topology_64.c
@@ -143,8 +143,8 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
143 limit |= (1<<24)-1; 143 limit |= (1<<24)-1;
144 limit++; 144 limit++;
145 145
146 if (limit > end_pfn << PAGE_SHIFT) 146 if (limit > max_pfn << PAGE_SHIFT)
147 limit = end_pfn << PAGE_SHIFT; 147 limit = max_pfn << PAGE_SHIFT;
148 if (limit <= base) 148 if (limit <= base)
149 continue; 149 continue;
150 150
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 316e5f961ef0..b432d5781773 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -86,7 +86,7 @@ static int __init allocate_cachealigned_memnodemap(void)
86 86
87 addr = 0x8000; 87 addr = 0x8000;
88 nodemap_size = round_up(sizeof(s16) * memnodemapsize, L1_CACHE_BYTES); 88 nodemap_size = round_up(sizeof(s16) * memnodemapsize, L1_CACHE_BYTES);
89 nodemap_addr = find_e820_area(addr, end_pfn<<PAGE_SHIFT, 89 nodemap_addr = find_e820_area(addr, max_pfn<<PAGE_SHIFT,
90 nodemap_size, L1_CACHE_BYTES); 90 nodemap_size, L1_CACHE_BYTES);
91 if (nodemap_addr == -1UL) { 91 if (nodemap_addr == -1UL) {
92 printk(KERN_ERR 92 printk(KERN_ERR
@@ -579,7 +579,7 @@ void __init paging_init(void)
579 memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); 579 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
580 max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; 580 max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
581 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; 581 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
582 max_zone_pfns[ZONE_NORMAL] = end_pfn; 582 max_zone_pfns[ZONE_NORMAL] = max_pfn;
583 583
584 sparse_memory_present_with_active_regions(MAX_NUMNODES); 584 sparse_memory_present_with_active_regions(MAX_NUMNODES);
585 sparse_init(); 585 sparse_init();
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index b67f5a16755f..0fd67b81a8b6 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -299,7 +299,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes)
299 pxmram = 0; 299 pxmram = 0;
300 } 300 }
301 301
302 e820ram = end_pfn - absent_pages_in_range(0, end_pfn); 302 e820ram = max_pfn - absent_pages_in_range(0, max_pfn);
303 /* We seem to lose 3 pages somewhere. Allow a bit of slack. */ 303 /* We seem to lose 3 pages somewhere. Allow a bit of slack. */
304 if ((long)(e820ram - pxmram) >= 1*1024*1024) { 304 if ((long)(e820ram - pxmram) >= 1*1024*1024) {
305 printk(KERN_ERR 305 printk(KERN_ERR