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