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 /arch/x86/mm/init_32.c | |
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 'arch/x86/mm/init_32.c')
-rw-r--r-- | arch/x86/mm/init_32.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 00168e65688a..73dd0601166a 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | unsigned int __VMALLOC_RESERVE = 128 << 20; | 52 | unsigned int __VMALLOC_RESERVE = 128 << 20; |
53 | 53 | ||
54 | unsigned long end_pfn_map; | ||
55 | |||
54 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 56 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
55 | unsigned long highstart_pfn, highend_pfn; | 57 | unsigned long highstart_pfn, highend_pfn; |
56 | 58 | ||
@@ -194,6 +196,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
194 | set_pmd(pmd, pfn_pmd(pfn, prot)); | 196 | set_pmd(pmd, pfn_pmd(pfn, prot)); |
195 | 197 | ||
196 | pfn += PTRS_PER_PTE; | 198 | pfn += PTRS_PER_PTE; |
199 | end_pfn_map = pfn; | ||
197 | continue; | 200 | continue; |
198 | } | 201 | } |
199 | pte = one_page_table_init(pmd); | 202 | pte = one_page_table_init(pmd); |
@@ -208,6 +211,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base) | |||
208 | 211 | ||
209 | set_pte(pte, pfn_pte(pfn, prot)); | 212 | set_pte(pte, pfn_pte(pfn, prot)); |
210 | } | 213 | } |
214 | end_pfn_map = pfn; | ||
211 | } | 215 | } |
212 | } | 216 | } |
213 | } | 217 | } |