[PATCH] x86-64: Remove mk_pte_phys()
[sfrench/cifs-2.6.git] / arch / x86_64 / mm / pageattr.c
index ccb91dd996a957c1dc26f183e095c3a8edbd30f1..65c5eaa5990563048b1ac59e04e3dcd645441b5c 100644 (file)
@@ -107,6 +107,7 @@ static void revert_page(unsigned long address, pgprot_t ref_prot)
        pud_t *pud;
        pmd_t *pmd;
        pte_t large_pte;
+       unsigned long pfn;
 
        pgd = pgd_offset_k(address);
        BUG_ON(pgd_none(*pgd));
@@ -114,7 +115,8 @@ static void revert_page(unsigned long address, pgprot_t ref_prot)
        BUG_ON(pud_none(*pud));
        pmd = pmd_offset(pud, address);
        BUG_ON(pmd_val(*pmd) & _PAGE_PSE);
-       large_pte = mk_pte_phys(__pa(address) & LARGE_PAGE_MASK, ref_prot);
+       pfn = (__pa(address) & LARGE_PAGE_MASK) >> PAGE_SHIFT;
+       large_pte = pfn_pte(pfn, ref_prot);
        large_pte = pte_mkhuge(large_pte);
        set_pte((pte_t *)pmd, large_pte);
 }