diff options
author | Andi Kleen <andi@firstfloor.org> | 2008-03-11 22:53:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:30 -0400 |
commit | 7d1116a92d709c22e7db910724c9fcd2001b0499 (patch) | |
tree | 364fe750182fd5b8e53f14c64aed490388f6c5e6 /include/asm-x86/page.h | |
parent | 41bd4eac748f39d7f3ed770fae3e595a747172bd (diff) |
x86: implement true end_pfn_mapped for 32bit
Even on 32bit 2MB pages can map more memory than is in the true
max_low_pfn if end_pfn is not highmem and not aligned to 2MB.
Add a end_pfn_map similar to x86-64 that accounts for this
fact. This is important for code that really needs to know about
all mapping aliases.
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: andreas.herrmann3@amd.com
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/page.h')
-rw-r--r-- | include/asm-x86/page.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index a05b2896492f..b734939916c4 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define max_pfn_mapped end_pfn_map | 36 | #define max_pfn_mapped end_pfn_map |
37 | #else | 37 | #else |
38 | #include <asm/page_32.h> | 38 | #include <asm/page_32.h> |
39 | #define max_pfn_mapped max_low_pfn | 39 | #define max_pfn_mapped end_pfn_map |
40 | #endif /* CONFIG_X86_64 */ | 40 | #endif /* CONFIG_X86_64 */ |
41 | 41 | ||
42 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 42 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
@@ -50,6 +50,8 @@ | |||
50 | 50 | ||
51 | extern int page_is_ram(unsigned long pagenr); | 51 | extern int page_is_ram(unsigned long pagenr); |
52 | 52 | ||
53 | extern unsigned long end_pfn_map; | ||
54 | |||
53 | struct page; | 55 | struct page; |
54 | 56 | ||
55 | static inline void clear_user_page(void *page, unsigned long vaddr, | 57 | static inline void clear_user_page(void *page, unsigned long vaddr, |