diff options
-rw-r--r-- | arch/x86_64/mm/init.c | 5 | ||||
-rw-r--r-- | include/asm-x86_64/page.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/proto.h | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 5659d979316d..b6a826d6c182 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -411,11 +411,6 @@ void __init mem_init(void) | |||
411 | #ifdef CONFIG_NUMA | 411 | #ifdef CONFIG_NUMA |
412 | totalram_pages = numa_free_all_bootmem(); | 412 | totalram_pages = numa_free_all_bootmem(); |
413 | #else | 413 | #else |
414 | |||
415 | #ifdef CONFIG_FLATMEM | ||
416 | max_mapnr = end_pfn; | ||
417 | if (!mem_map) BUG(); | ||
418 | #endif | ||
419 | totalram_pages = free_all_bootmem(); | 414 | totalram_pages = free_all_bootmem(); |
420 | #endif | 415 | #endif |
421 | reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn); | 416 | reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn); |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 135ffaa0393b..e5ab4d231f2c 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
34 | 34 | ||
35 | extern unsigned long end_pfn; | ||
36 | |||
35 | void clear_page(void *); | 37 | void clear_page(void *); |
36 | void copy_page(void *, void *); | 38 | void copy_page(void *, void *); |
37 | 39 | ||
@@ -111,7 +113,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
111 | #ifdef CONFIG_FLATMEM | 113 | #ifdef CONFIG_FLATMEM |
112 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 114 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
113 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 115 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
114 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 116 | #define pfn_valid(pfn) ((pfn) < end_pfn) |
115 | #endif | 117 | #endif |
116 | 118 | ||
117 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 119 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index f7574196424e..764b5f822ce2 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -93,8 +93,6 @@ extern int unhandled_signal(struct task_struct *tsk, int sig); | |||
93 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 93 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
94 | extern void swiotlb_init(void); | 94 | extern void swiotlb_init(void); |
95 | 95 | ||
96 | extern unsigned long max_mapnr; | ||
97 | extern unsigned long end_pfn; | ||
98 | extern unsigned long table_start, table_end; | 96 | extern unsigned long table_start, table_end; |
99 | 97 | ||
100 | extern int exception_trace; | 98 | extern int exception_trace; |