Lines Matching refs:ptdesc
2791 static inline struct ptdesc *virt_to_ptdesc(const void *x) in virt_to_ptdesc()
2796 static inline void *ptdesc_to_virt(const struct ptdesc *pt) in ptdesc_to_virt()
2801 static inline void *ptdesc_address(const struct ptdesc *pt) in ptdesc_address()
2806 static inline bool pagetable_is_reserved(struct ptdesc *pt) in pagetable_is_reserved()
2821 static inline struct ptdesc *pagetable_alloc(gfp_t gfp, unsigned int order) in pagetable_alloc()
2835 static inline void pagetable_free(struct ptdesc *pt) in pagetable_free()
2845 bool ptlock_alloc(struct ptdesc *ptdesc);
2846 void ptlock_free(struct ptdesc *ptdesc);
2848 static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc) in ptlock_ptr() argument
2850 return ptdesc->ptl; in ptlock_ptr()
2857 static inline bool ptlock_alloc(struct ptdesc *ptdesc) in ptlock_alloc() argument
2862 static inline void ptlock_free(struct ptdesc *ptdesc) in ptlock_free() argument
2866 static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc) in ptlock_ptr() argument
2868 return &ptdesc->ptl; in ptlock_ptr()
2877 static inline bool ptlock_init(struct ptdesc *ptdesc) in ptlock_init() argument
2886 VM_BUG_ON_PAGE(*(unsigned long *)&ptdesc->ptl, ptdesc_page(ptdesc)); in ptlock_init()
2887 if (!ptlock_alloc(ptdesc)) in ptlock_init()
2889 spin_lock_init(ptlock_ptr(ptdesc)); in ptlock_init()
2902 static inline bool ptlock_init(struct ptdesc *ptdesc) { return true; } in ptlock_init() argument
2903 static inline void ptlock_free(struct ptdesc *ptdesc) {} in ptlock_free() argument
2906 static inline bool pagetable_pte_ctor(struct ptdesc *ptdesc) in pagetable_pte_ctor() argument
2908 struct folio *folio = ptdesc_folio(ptdesc); in pagetable_pte_ctor()
2910 if (!ptlock_init(ptdesc)) in pagetable_pte_ctor()
2917 static inline void pagetable_pte_dtor(struct ptdesc *ptdesc) in pagetable_pte_dtor() argument
2919 struct folio *folio = ptdesc_folio(ptdesc); in pagetable_pte_dtor()
2921 ptlock_free(ptdesc); in pagetable_pte_dtor()
2972 static inline struct ptdesc *pmd_ptdesc(pmd_t *pmd) in pmd_ptdesc()
2982 static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) in pmd_ptlock_init() argument
2985 ptdesc->pmd_huge_pte = NULL; in pmd_ptlock_init()
2987 return ptlock_init(ptdesc); in pmd_ptlock_init()
2990 static inline void pmd_ptlock_free(struct ptdesc *ptdesc) in pmd_ptlock_free() argument
2993 VM_BUG_ON_PAGE(ptdesc->pmd_huge_pte, ptdesc_page(ptdesc)); in pmd_ptlock_free()
2995 ptlock_free(ptdesc); in pmd_ptlock_free()
3007 static inline bool pmd_ptlock_init(struct ptdesc *ptdesc) { return true; } in pmd_ptlock_init() argument
3008 static inline void pmd_ptlock_free(struct ptdesc *ptdesc) {} in pmd_ptlock_free() argument
3021 static inline bool pagetable_pmd_ctor(struct ptdesc *ptdesc) in pagetable_pmd_ctor() argument
3023 struct folio *folio = ptdesc_folio(ptdesc); in pagetable_pmd_ctor()
3025 if (!pmd_ptlock_init(ptdesc)) in pagetable_pmd_ctor()
3032 static inline void pagetable_pmd_dtor(struct ptdesc *ptdesc) in pagetable_pmd_dtor() argument
3034 struct folio *folio = ptdesc_folio(ptdesc); in pagetable_pmd_dtor()
3036 pmd_ptlock_free(ptdesc); in pagetable_pmd_dtor()
3093 static inline void free_reserved_ptdesc(struct ptdesc *pt) in free_reserved_ptdesc()