Lines Matching refs:umem
69 void siw_umem_release(struct siw_umem *umem, bool dirty) in siw_umem_release() argument
71 struct mm_struct *mm_s = umem->owning_mm; in siw_umem_release()
72 int i, num_pages = umem->num_pages; in siw_umem_release()
77 siw_free_plist(&umem->page_chunk[i], to_free, in siw_umem_release()
78 umem->writable && dirty); in siw_umem_release()
79 kfree(umem->page_chunk[i].plist); in siw_umem_release()
82 atomic64_sub(umem->num_pages, &mm_s->pinned_vm); in siw_umem_release()
85 kfree(umem->page_chunk); in siw_umem_release()
86 kfree(umem); in siw_umem_release()
148 siw_umem_release(mem->umem, true); in siw_free_mem()
367 struct siw_umem *umem; in siw_umem_get() local
384 umem = kzalloc(sizeof(*umem), GFP_KERNEL); in siw_umem_get()
385 if (!umem) in siw_umem_get()
389 umem->owning_mm = mm_s; in siw_umem_get()
390 umem->writable = writable; in siw_umem_get()
405 umem->fp_addr = first_page_va; in siw_umem_get()
407 umem->page_chunk = in siw_umem_get()
409 if (!umem->page_chunk) { in siw_umem_get()
416 umem->page_chunk[i].plist = in siw_umem_get()
418 if (!umem->page_chunk[i].plist) { in siw_umem_get()
424 struct page **plist = &umem->page_chunk[i].plist[got]; in siw_umem_get()
432 umem->num_pages += rv; in siw_umem_get()
444 return umem; in siw_umem_get()
446 siw_umem_release(umem, false); in siw_umem_get()