From: Andi Kleen Date: Mon, 4 Feb 2008 15:48:09 +0000 (+0100) Subject: x86: switch direct mapping setup over to set_pte X-Git-Tag: v2.6.25-rc1~1057^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4f71f7969ee2c16e2969185280c13d4f51a9172;p=profile%2Fivi%2Fkernel-x86-ivi.git x86: switch direct mapping setup over to set_pte Use set_pte() for setting up the 2MB pages in the direct mapping. Signed-off-by: Andi Kleen Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 5855449..3a98d6f 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -273,7 +273,6 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end) int i = pmd_index(address); for (; i < PTRS_PER_PMD; i++, address += PMD_SIZE) { - unsigned long entry; pmd_t *pmd = pmd_page + pmd_index(address); if (address >= end) { @@ -287,9 +286,8 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end) if (pmd_val(*pmd)) continue; - entry = __PAGE_KERNEL_LARGE|_PAGE_GLOBAL|address; - entry &= __supported_pte_mask; - set_pmd(pmd, __pmd(entry)); + set_pte((pte_t *)pmd, + pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL_LARGE)); } }