Lines Matching refs:pmd
31 bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd);
70 #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) argument
94 #define pmd_clear(pmd) native_pmd_clear(pmd) argument
134 static inline int pmd_dirty(pmd_t pmd) in pmd_dirty() argument
136 return pmd_flags(pmd) & _PAGE_DIRTY; in pmd_dirty()
139 static inline int pmd_young(pmd_t pmd) in pmd_young() argument
141 return pmd_flags(pmd) & _PAGE_ACCESSED; in pmd_young()
190 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument
192 phys_addr_t pfn = pmd_val(pmd); in pmd_pfn()
194 return (pfn & pmd_pfn_mask(pmd)) >> PAGE_SHIFT; in pmd_pfn()
231 static inline int pmd_trans_huge(pmd_t pmd) in pmd_trans_huge() argument
233 return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE; in pmd_trans_huge()
250 static inline int pmd_devmap(pmd_t pmd) in pmd_devmap() argument
252 return !!(pmd_val(pmd) & _PAGE_DEVMAP); in pmd_devmap()
370 static inline pmd_t pmd_set_flags(pmd_t pmd, pmdval_t set) in pmd_set_flags() argument
372 pmdval_t v = native_pmd_val(pmd); in pmd_set_flags()
377 static inline pmd_t pmd_clear_flags(pmd_t pmd, pmdval_t clear) in pmd_clear_flags() argument
379 pmdval_t v = native_pmd_val(pmd); in pmd_clear_flags()
385 static inline int pmd_uffd_wp(pmd_t pmd) in pmd_uffd_wp() argument
387 return pmd_flags(pmd) & _PAGE_UFFD_WP; in pmd_uffd_wp()
390 static inline pmd_t pmd_mkuffd_wp(pmd_t pmd) in pmd_mkuffd_wp() argument
392 return pmd_set_flags(pmd, _PAGE_UFFD_WP); in pmd_mkuffd_wp()
395 static inline pmd_t pmd_clear_uffd_wp(pmd_t pmd) in pmd_clear_uffd_wp() argument
397 return pmd_clear_flags(pmd, _PAGE_UFFD_WP); in pmd_clear_uffd_wp()
401 static inline pmd_t pmd_mkold(pmd_t pmd) in pmd_mkold() argument
403 return pmd_clear_flags(pmd, _PAGE_ACCESSED); in pmd_mkold()
406 static inline pmd_t pmd_mkclean(pmd_t pmd) in pmd_mkclean() argument
408 return pmd_clear_flags(pmd, _PAGE_DIRTY); in pmd_mkclean()
411 static inline pmd_t pmd_wrprotect(pmd_t pmd) in pmd_wrprotect() argument
413 return pmd_clear_flags(pmd, _PAGE_RW); in pmd_wrprotect()
416 static inline pmd_t pmd_mkdirty(pmd_t pmd) in pmd_mkdirty() argument
418 return pmd_set_flags(pmd, _PAGE_DIRTY | _PAGE_SOFT_DIRTY); in pmd_mkdirty()
421 static inline pmd_t pmd_mkdevmap(pmd_t pmd) in pmd_mkdevmap() argument
423 return pmd_set_flags(pmd, _PAGE_DEVMAP); in pmd_mkdevmap()
426 static inline pmd_t pmd_mkhuge(pmd_t pmd) in pmd_mkhuge() argument
428 return pmd_set_flags(pmd, _PAGE_PSE); in pmd_mkhuge()
431 static inline pmd_t pmd_mkyoung(pmd_t pmd) in pmd_mkyoung() argument
433 return pmd_set_flags(pmd, _PAGE_ACCESSED); in pmd_mkyoung()
436 static inline pmd_t pmd_mkwrite(pmd_t pmd) in pmd_mkwrite() argument
438 return pmd_set_flags(pmd, _PAGE_RW); in pmd_mkwrite()
501 static inline int pmd_soft_dirty(pmd_t pmd) in pmd_soft_dirty() argument
503 return pmd_flags(pmd) & _PAGE_SOFT_DIRTY; in pmd_soft_dirty()
516 static inline pmd_t pmd_mksoft_dirty(pmd_t pmd) in pmd_mksoft_dirty() argument
518 return pmd_set_flags(pmd, _PAGE_SOFT_DIRTY); in pmd_mksoft_dirty()
531 static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd) in pmd_clear_soft_dirty() argument
533 return pmd_clear_flags(pmd, _PAGE_SOFT_DIRTY); in pmd_clear_soft_dirty()
598 static inline pmd_t pmd_mkinvalid(pmd_t pmd) in pmd_mkinvalid() argument
600 return pfn_pmd(pmd_pfn(pmd), in pmd_mkinvalid()
601 __pgprot(pmd_flags(pmd) & ~(_PAGE_PRESENT|_PAGE_PROTNONE))); in pmd_mkinvalid()
620 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) in pmd_modify() argument
622 pmdval_t val = pmd_val(pmd), oldval = val; in pmd_modify()
761 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
769 return pmd_flags(pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PSE); in pmd_present()
783 static inline int pmd_protnone(pmd_t pmd) in pmd_protnone() argument
785 return (pmd_flags(pmd) & (_PAGE_PROTNONE | _PAGE_PRESENT)) in pmd_protnone()
790 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
794 unsigned long val = native_pmd_val(pmd); in pmd_none()
798 static inline unsigned long pmd_page_vaddr(pmd_t pmd) in pmd_page_vaddr() argument
800 return (unsigned long)__va(pmd_val(pmd) & pmd_pfn_mask(pmd)); in pmd_page_vaddr()
807 #define pmd_page(pmd) pfn_to_page(pmd_pfn(pmd)) argument
818 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
820 return (pmd_flags(pmd) & ~_PAGE_USER) != _KERNPG_TABLE; in pmd_bad()
1013 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
1015 set_pmd(pmdp, pmd); in set_pmd_at()
1103 static inline int pmd_write(pmd_t pmd) in pmd_write() argument
1105 return pmd_flags(pmd) & _PAGE_RW; in pmd_write()
1138 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish()
1141 return xchg(pmdp, pmd); in pmdp_establish()
1144 WRITE_ONCE(*pmdp, pmd); in pmdp_establish()
1260 unsigned long addr, pmd_t *pmd) in update_mmu_cache_pmd() argument
1285 static inline pmd_t pmd_swp_mksoft_dirty(pmd_t pmd) in pmd_swp_mksoft_dirty() argument
1287 return pmd_set_flags(pmd, _PAGE_SWP_SOFT_DIRTY); in pmd_swp_mksoft_dirty()
1290 static inline int pmd_swp_soft_dirty(pmd_t pmd) in pmd_swp_soft_dirty() argument
1292 return pmd_flags(pmd) & _PAGE_SWP_SOFT_DIRTY; in pmd_swp_soft_dirty()
1295 static inline pmd_t pmd_swp_clear_soft_dirty(pmd_t pmd) in pmd_swp_clear_soft_dirty() argument
1297 return pmd_clear_flags(pmd, _PAGE_SWP_SOFT_DIRTY); in pmd_swp_clear_soft_dirty()
1318 static inline pmd_t pmd_swp_mkuffd_wp(pmd_t pmd) in pmd_swp_mkuffd_wp() argument
1320 return pmd_set_flags(pmd, _PAGE_SWP_UFFD_WP); in pmd_swp_mkuffd_wp()
1323 static inline int pmd_swp_uffd_wp(pmd_t pmd) in pmd_swp_uffd_wp() argument
1325 return pmd_flags(pmd) & _PAGE_SWP_UFFD_WP; in pmd_swp_uffd_wp()
1328 static inline pmd_t pmd_swp_clear_uffd_wp(pmd_t pmd) in pmd_swp_clear_uffd_wp() argument
1330 return pmd_clear_flags(pmd, _PAGE_SWP_UFFD_WP); in pmd_swp_clear_uffd_wp()
1381 static inline bool pmd_access_permitted(pmd_t pmd, bool write) in pmd_access_permitted() argument
1383 return __pte_access_permitted(pmd_val(pmd), write); in pmd_access_permitted()