Commit 5f51e139 authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds
Browse files

[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: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b633237e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -88,8 +88,6 @@ void show_mem(void)
	printk(KERN_INFO "%lu pages swap cached\n",cached);
}

/* References to section boundaries */

int after_bootmem;

static __init void *spp_getpage(void)
@@ -259,7 +257,8 @@ phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end)
	for (i = 0; i < PTRS_PER_PMD; pmd++, i++, address += PMD_SIZE) {
		unsigned long entry;

		if (address > end) {
		if (address >= end) {
			if (!after_bootmem)
				for (; i < PTRS_PER_PMD; i++, pmd++)
					set_pmd(pmd, __pmd(0));
			break;
@@ -339,7 +338,8 @@ static void __init find_early_table_space(unsigned long end)
	table_end = table_start;

	early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n",
		end, table_start << PAGE_SHIFT, table_end << PAGE_SHIFT);
		end, table_start << PAGE_SHIFT,
		(table_start << PAGE_SHIFT) + tables);
}

/* Setup the direct mapping of the physical memory at PAGE_OFFSET.