Lines Matching refs:pmd
180 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
188 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE | _PAGE_LEAF)); in pmd_present()
191 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
193 return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE)); in pmd_present()
197 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
199 return (pmd_val(pmd) == 0); in pmd_none()
202 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
204 return !pmd_present(pmd) || (pmd_val(pmd) & _PAGE_LEAF); in pmd_bad()
208 static inline int pmd_leaf(pmd_t pmd) in pmd_leaf() argument
210 return pmd_present(pmd) && (pmd_val(pmd) & _PAGE_LEAF); in pmd_leaf()
213 static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) in set_pmd() argument
215 *pmdp = pmd; in set_pmd()
233 static inline struct page *pmd_page(pmd_t pmd) in pmd_page() argument
235 return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT); in pmd_page()
238 static inline unsigned long pmd_page_vaddr(pmd_t pmd) in pmd_page_vaddr() argument
240 return (unsigned long)pfn_to_virt(pmd_val(pmd) >> _PAGE_PFN_SHIFT); in pmd_page_vaddr()
243 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument
245 return __pte(pmd_val(pmd)); in pmd_pte()
364 static inline int pmd_protnone(pmd_t pmd) in pmd_protnone() argument
366 return pte_protnone(pmd_pte(pmd)); in pmd_protnone()
503 static inline pmd_t pmd_mkhuge(pmd_t pmd) in pmd_mkhuge() argument
505 return pmd; in pmd_mkhuge()
508 static inline pmd_t pmd_mkinvalid(pmd_t pmd) in pmd_mkinvalid() argument
510 return __pmd(pmd_val(pmd) & ~(_PAGE_PRESENT|_PAGE_PROT_NONE)); in pmd_mkinvalid()
513 #define __pmd_to_phys(pmd) (pmd_val(pmd) >> _PAGE_PFN_SHIFT << PAGE_SHIFT) argument
515 static inline unsigned long pmd_pfn(pmd_t pmd) in pmd_pfn() argument
517 return ((__pmd_to_phys(pmd) & PMD_MASK) >> PAGE_SHIFT); in pmd_pfn()
520 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) in pmd_modify() argument
522 return pte_pmd(pte_modify(pmd_pte(pmd), newprot)); in pmd_modify()
526 static inline int pmd_write(pmd_t pmd) in pmd_write() argument
528 return pte_write(pmd_pte(pmd)); in pmd_write()
531 static inline int pmd_dirty(pmd_t pmd) in pmd_dirty() argument
533 return pte_dirty(pmd_pte(pmd)); in pmd_dirty()
536 static inline int pmd_young(pmd_t pmd) in pmd_young() argument
538 return pte_young(pmd_pte(pmd)); in pmd_young()
541 static inline pmd_t pmd_mkold(pmd_t pmd) in pmd_mkold() argument
543 return pte_pmd(pte_mkold(pmd_pte(pmd))); in pmd_mkold()
546 static inline pmd_t pmd_mkyoung(pmd_t pmd) in pmd_mkyoung() argument
548 return pte_pmd(pte_mkyoung(pmd_pte(pmd))); in pmd_mkyoung()
551 static inline pmd_t pmd_mkwrite(pmd_t pmd) in pmd_mkwrite() argument
553 return pte_pmd(pte_mkwrite(pmd_pte(pmd))); in pmd_mkwrite()
556 static inline pmd_t pmd_wrprotect(pmd_t pmd) in pmd_wrprotect() argument
558 return pte_pmd(pte_wrprotect(pmd_pte(pmd))); in pmd_wrprotect()
561 static inline pmd_t pmd_mkclean(pmd_t pmd) in pmd_mkclean() argument
563 return pte_pmd(pte_mkclean(pmd_pte(pmd))); in pmd_mkclean()
566 static inline pmd_t pmd_mkdirty(pmd_t pmd) in pmd_mkdirty() argument
568 return pte_pmd(pte_mkdirty(pmd_pte(pmd))); in pmd_mkdirty()
572 pmd_t *pmdp, pmd_t pmd) in set_pmd_at() argument
574 return set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)); in set_pmd_at()
584 static inline int pmd_trans_huge(pmd_t pmd) in pmd_trans_huge() argument
586 return pmd_leaf(pmd); in pmd_trans_huge()
620 unsigned long address, pmd_t *pmdp, pmd_t pmd) in pmdp_establish()
622 return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd))); in pmdp_establish()