pte_update_phys(): update physical address of a PTE

This commit is contained in:
Balazs Gerofi
2017-05-04 04:47:16 +09:00
parent 7a606baad4
commit 06f824c829

View File

@ -204,6 +204,11 @@ static inline int pte_is_fileoff(pte_t *ptep, size_t pgsize)
}
}
static inline void pte_update_phys(pte_t *ptep, unsigned long phys)
{
*ptep = (*ptep & ~PT_PHYSMASK) | (phys & PT_PHYSMASK);
}
static inline uintptr_t pte_get_phys(pte_t *ptep)
{
return (*ptep & PT_PHYSMASK);