[PATCH] x86-64: Remove redundant max_mapnr and replace with end_pfn
The FLATMEM people added it, but there doesn't seem a good reason because end_pfn is identical. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
0a43e4bf74
commit
b9aac10ddd
3 changed files with 3 additions and 8 deletions
|
@ -411,11 +411,6 @@ void __init mem_init(void)
|
||||||
#ifdef CONFIG_NUMA
|
#ifdef CONFIG_NUMA
|
||||||
totalram_pages = numa_free_all_bootmem();
|
totalram_pages = numa_free_all_bootmem();
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef CONFIG_FLATMEM
|
|
||||||
max_mapnr = end_pfn;
|
|
||||||
if (!mem_map) BUG();
|
|
||||||
#endif
|
|
||||||
totalram_pages = free_all_bootmem();
|
totalram_pages = free_all_bootmem();
|
||||||
#endif
|
#endif
|
||||||
reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn);
|
reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn);
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
extern unsigned long end_pfn;
|
||||||
|
|
||||||
void clear_page(void *);
|
void clear_page(void *);
|
||||||
void copy_page(void *, void *);
|
void copy_page(void *, void *);
|
||||||
|
|
||||||
|
@ -111,7 +113,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
|
||||||
#ifdef CONFIG_FLATMEM
|
#ifdef CONFIG_FLATMEM
|
||||||
#define pfn_to_page(pfn) (mem_map + (pfn))
|
#define pfn_to_page(pfn) (mem_map + (pfn))
|
||||||
#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
|
#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
|
||||||
#define pfn_valid(pfn) ((pfn) < max_mapnr)
|
#define pfn_valid(pfn) ((pfn) < end_pfn)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||||
|
|
|
@ -93,8 +93,6 @@ extern int unhandled_signal(struct task_struct *tsk, int sig);
|
||||||
extern void select_idle_routine(const struct cpuinfo_x86 *c);
|
extern void select_idle_routine(const struct cpuinfo_x86 *c);
|
||||||
extern void swiotlb_init(void);
|
extern void swiotlb_init(void);
|
||||||
|
|
||||||
extern unsigned long max_mapnr;
|
|
||||||
extern unsigned long end_pfn;
|
|
||||||
extern unsigned long table_start, table_end;
|
extern unsigned long table_start, table_end;
|
||||||
|
|
||||||
extern int exception_trace;
|
extern int exception_trace;
|
||||||
|
|
Loading…
Reference in a new issue