|
@@ -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);
|
|
|
}
|