Lines Matching refs:ptdesc

21 	struct ptdesc *ptdesc;  in pte_frag_destroy()  local
23 ptdesc = virt_to_ptdesc(pte_frag); in pte_frag_destroy()
27 if (atomic_sub_and_test(PTE_FRAG_NR - count, &ptdesc->pt_frag_refcount)) { in pte_frag_destroy()
28 pagetable_pte_dtor(ptdesc); in pte_frag_destroy()
29 pagetable_free(ptdesc); in pte_frag_destroy()
58 struct ptdesc *ptdesc; in __alloc_for_ptecache() local
61 ptdesc = pagetable_alloc(PGALLOC_GFP | __GFP_ACCOUNT, 0); in __alloc_for_ptecache()
62 if (!ptdesc) in __alloc_for_ptecache()
64 if (!pagetable_pte_ctor(ptdesc)) { in __alloc_for_ptecache()
65 pagetable_free(ptdesc); in __alloc_for_ptecache()
69 ptdesc = pagetable_alloc(PGALLOC_GFP, 0); in __alloc_for_ptecache()
70 if (!ptdesc) in __alloc_for_ptecache()
74 atomic_set(&ptdesc->pt_frag_refcount, 1); in __alloc_for_ptecache()
76 ret = ptdesc_address(ptdesc); in __alloc_for_ptecache()
90 atomic_set(&ptdesc->pt_frag_refcount, PTE_FRAG_NR); in __alloc_for_ptecache()
111 struct ptdesc *ptdesc; in pte_free_now() local
113 ptdesc = container_of(head, struct ptdesc, pt_rcu_head); in pte_free_now()
114 pagetable_pte_dtor(ptdesc); in pte_free_now()
115 pagetable_free(ptdesc); in pte_free_now()
120 struct ptdesc *ptdesc = virt_to_ptdesc(table); in pte_fragment_free() local
122 if (pagetable_is_reserved(ptdesc)) in pte_fragment_free()
123 return free_reserved_ptdesc(ptdesc); in pte_fragment_free()
125 BUG_ON(atomic_read(&ptdesc->pt_frag_refcount) <= 0); in pte_fragment_free()
126 if (atomic_dec_and_test(&ptdesc->pt_frag_refcount)) { in pte_fragment_free()
128 pagetable_free(ptdesc); in pte_fragment_free()
129 else if (folio_test_clear_active(ptdesc_folio(ptdesc))) in pte_fragment_free()
130 call_rcu(&ptdesc->pt_rcu_head, pte_free_now); in pte_fragment_free()
132 pte_free_now(&ptdesc->pt_rcu_head); in pte_fragment_free()