forked from Minki/linux
[PATCH] x86-64: Remove mk_pte_phys()
- Convert last user to pfn_pte - Remove mk_pte_phys Suggested by Jan Beulich Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
parent
22c5ace729
commit
126b192236
@ -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);
|
||||
}
|
||||
|
@ -359,15 +359,6 @@ static inline int pmd_large(pmd_t pte) {
|
||||
#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
|
||||
#define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE)
|
||||
|
||||
/* physical address -> PTE */
|
||||
static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
|
||||
{
|
||||
pte_t pte;
|
||||
pte_val(pte) = physpage | pgprot_val(pgprot);
|
||||
pte_val(pte) &= __supported_pte_mask;
|
||||
return pte;
|
||||
}
|
||||
|
||||
/* Change flags of a PTE */
|
||||
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user