Lines Matching full:pmd

44  * We need to mark a pmd pte invalid while splitting. We can do that by clearing
159 /* pmd table use page table fragments */
220 /* Bits to mask out from a PMD to get to the PTE page */
222 /* Bits to mask out from a PUD to get to the PMD page */
266 static inline bool pmd_leaf(pmd_t pmd) in pmd_leaf() argument
268 return !!(pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE)); in pmd_leaf()
278 static inline unsigned long pmd_leaf_size(pmd_t pmd) in pmd_leaf_size() argument
644 #define __pmd_to_swp_entry(pmd) (__pte_to_swp_entry(pmd_pte(pmd))) argument
800 static inline int pmd_none(pmd_t pmd) in pmd_none() argument
802 return !pmd_raw(pmd); in pmd_none()
805 static inline int pmd_present(pmd_t pmd) in pmd_present() argument
808 * A pmd is considerent present if _PAGE_PRESENT is set. in pmd_present()
809 * We also need to consider the pmd present which is marked in pmd_present()
813 if (pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) in pmd_present()
819 static inline int pmd_is_serializing(pmd_t pmd) in pmd_is_serializing() argument
822 * If the pmd is undergoing a split, the _PAGE_PRESENT bit is clear in pmd_is_serializing()
825 * This condition may also occur when flushing a pmd while flushing in pmd_is_serializing()
829 if ((pmd_raw(pmd) & cpu_to_be64(_PAGE_PRESENT | _PAGE_INVALID)) == in pmd_is_serializing()
836 static inline int pmd_bad(pmd_t pmd) in pmd_bad() argument
839 return radix__pmd_bad(pmd); in pmd_bad()
840 return hash__pmd_bad(pmd); in pmd_bad()
866 extern struct page *pmd_page(pmd_t pmd);
894 #define pud_soft_dirty(pmd) pte_soft_dirty(pud_pte(pud)) argument
895 #define pud_mksoft_dirty(pmd) pte_pud(pte_mksoft_dirty(pud_pte(pud))) argument
896 #define pud_clear_soft_dirty(pmd) pte_pud(pte_clear_soft_dirty(pud_pte(pud))) argument
974 pr_err("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
1013 static inline pte_t pmd_pte(pmd_t pmd) in pmd_pte() argument
1015 return __pte_raw(pmd_raw(pmd)); in pmd_pte()
1023 static inline pte_t *pmdp_ptep(pmd_t *pmd) in pmdp_ptep() argument
1025 return (pte_t *)pmd; in pmdp_ptep()
1027 #define pmd_pfn(pmd) pte_pfn(pmd_pte(pmd)) argument
1028 #define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd)) argument
1029 #define pmd_young(pmd) pte_young(pmd_pte(pmd)) argument
1030 #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) argument
1031 #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) argument
1032 #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) argument
1033 #define pmd_mkclean(pmd) pte_pmd(pte_mkclean(pmd_pte(pmd))) argument
1034 #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) argument
1035 #define pmd_mkwrite_novma(pmd) pte_pmd(pte_mkwrite_novma(pmd_pte(pmd))) argument
1038 #define pmd_soft_dirty(pmd) pte_soft_dirty(pmd_pte(pmd)) argument
1039 #define pmd_mksoft_dirty(pmd) pte_pmd(pte_mksoft_dirty(pmd_pte(pmd))) argument
1040 #define pmd_clear_soft_dirty(pmd) pte_pmd(pte_clear_soft_dirty(pmd_pte(pmd))) argument
1043 #define pmd_swp_mksoft_dirty(pmd) pte_pmd(pte_swp_mksoft_dirty(pmd_pte(pmd))) argument
1044 #define pmd_swp_soft_dirty(pmd) pte_swp_soft_dirty(pmd_pte(pmd)) argument
1045 #define pmd_swp_clear_soft_dirty(pmd) pte_pmd(pte_swp_clear_soft_dirty(pmd_pte(pmd))) argument
1050 static inline int pmd_protnone(pmd_t pmd) in pmd_protnone() argument
1052 return pte_protnone(pmd_pte(pmd)); in pmd_protnone()
1056 #define pmd_write(pmd) pte_write(pmd_pte(pmd)) argument
1059 static inline bool pmd_access_permitted(pmd_t pmd, bool write) in pmd_access_permitted() argument
1071 if (pmd_is_serializing(pmd)) in pmd_access_permitted()
1074 return pte_access_permitted(pmd_pte(pmd), write); in pmd_access_permitted()
1080 extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
1083 pmd_t *pmdp, pmd_t pmd);
1088 unsigned long addr, pmd_t *pmd) in update_mmu_cache_pmd() argument
1176 * Only returns true for a THP. False for pmd migration entry.
1178 * in between a thp split. While splitting THP, we mark the pmd
1180 * address. A pmd_trans_huge() check against a pmd entry during that time
1186 static inline int pmd_trans_huge(pmd_t pmd) in pmd_trans_huge() argument
1188 if (!pmd_present(pmd)) in pmd_trans_huge()
1192 return radix__pmd_trans_huge(pmd); in pmd_trans_huge()
1193 return hash__pmd_trans_huge(pmd); in pmd_trans_huge()
1224 static inline pmd_t __pmd_mkhuge(pmd_t pmd) in __pmd_mkhuge() argument
1227 return radix__pmd_mkhuge(pmd); in __pmd_mkhuge()
1228 return hash__pmd_mkhuge(pmd); in __pmd_mkhuge()
1240 * pfn_pmd return a pmd_t that can be used as pmd pte entry.
1242 static inline pmd_t pmd_mkhuge(pmd_t pmd) in pmd_mkhuge() argument
1246 WARN_ON((pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE)) == 0); in pmd_mkhuge()
1248 WARN_ON((pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE | H_PAGE_THP_HUGE)) != in pmd_mkhuge()
1251 return pmd; in pmd_mkhuge()