aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-06-26 07:59:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 13:48:20 -0400
commit5f51e139d8b29116779044f26f84cceae34c31a4 (patch)
tree23fd510f939878a3c833cf8b657d4f27ec30049d /arch/x86_64
parentb633237e9c1b91b86c431c5d41266b47408b4642 (diff)
[PATCH] x86_64: miscellaneous mm/init.c fixes
- fix an off-by-one error in phys_pmd_init() - prevent phys_pmd_init() from removing mappings established earlier - fix the direct mapping early printk to in fact show the end of the range - remove an apparently orphan comment Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/mm/init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 2f5f5b11e9d0..02add1d1dfa8 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -88,8 +88,6 @@ void show_mem(void)
88 printk(KERN_INFO "%lu pages swap cached\n",cached); 88 printk(KERN_INFO "%lu pages swap cached\n",cached);
89} 89}
90 90
91/* References to section boundaries */
92
93int after_bootmem; 91int after_bootmem;
94 92
95static __init void *spp_getpage(void) 93static __init void *spp_getpage(void)
@@ -259,9 +257,10 @@ phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end)
259 for (i = 0; i < PTRS_PER_PMD; pmd++, i++, address += PMD_SIZE) { 257 for (i = 0; i < PTRS_PER_PMD; pmd++, i++, address += PMD_SIZE) {
260 unsigned long entry; 258 unsigned long entry;
261 259
262 if (address > end) { 260 if (address >= end) {
263 for (; i < PTRS_PER_PMD; i++, pmd++) 261 if (!after_bootmem)
264 set_pmd(pmd, __pmd(0)); 262 for (; i < PTRS_PER_PMD; i++, pmd++)
263 set_pmd(pmd, __pmd(0));
265 break; 264 break;
266 } 265 }
267 entry = _PAGE_NX|_PAGE_PSE|_KERNPG_TABLE|_PAGE_GLOBAL|address; 266 entry = _PAGE_NX|_PAGE_PSE|_KERNPG_TABLE|_PAGE_GLOBAL|address;
@@ -339,7 +338,8 @@ static void __init find_early_table_space(unsigned long end)
339 table_end = table_start; 338 table_end = table_start;
340 339
341 early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n", 340 early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n",
342 end, table_start << PAGE_SHIFT, table_end << PAGE_SHIFT); 341 end, table_start << PAGE_SHIFT,
342 (table_start << PAGE_SHIFT) + tables);
343} 343}
344 344
345/* Setup the direct mapping of the physical memory at PAGE_OFFSET. 345/* Setup the direct mapping of the physical memory at PAGE_OFFSET.