Lines Matching refs:ucontext

209 	struct ib_ucontext *ucontext;  in ib_alloc_ucontext()  local
217 ucontext = rdma_zalloc_drv_obj(ib_dev, ib_ucontext); in ib_alloc_ucontext()
218 if (!ucontext) in ib_alloc_ucontext()
221 ucontext->device = ib_dev; in ib_alloc_ucontext()
222 ucontext->ufile = ufile; in ib_alloc_ucontext()
223 xa_init_flags(&ucontext->mmap_xa, XA_FLAGS_ALLOC); in ib_alloc_ucontext()
225 rdma_restrack_new(&ucontext->res, RDMA_RESTRACK_CTX); in ib_alloc_ucontext()
226 rdma_restrack_set_name(&ucontext->res, NULL); in ib_alloc_ucontext()
227 attrs->context = ucontext; in ib_alloc_ucontext()
233 struct ib_ucontext *ucontext = attrs->context; in ib_init_ucontext() local
240 if (file->ucontext) { in ib_init_ucontext()
245 ret = ib_rdmacg_try_charge(&ucontext->cg_obj, ucontext->device, in ib_init_ucontext()
250 ret = ucontext->device->ops.alloc_ucontext(ucontext, in ib_init_ucontext()
255 rdma_restrack_add(&ucontext->res); in ib_init_ucontext()
261 smp_store_release(&file->ucontext, ucontext); in ib_init_ucontext()
268 ib_rdmacg_uncharge(&ucontext->cg_obj, ucontext->device, in ib_init_ucontext()
324 static void copy_query_dev_fields(struct ib_ucontext *ucontext, in copy_query_dev_fields() argument
328 struct ib_device *ib_dev = ucontext->device; in copy_query_dev_fields()
374 struct ib_ucontext *ucontext; in ib_uverbs_query_device() local
377 ucontext = ib_uverbs_get_ucontext(attrs); in ib_uverbs_query_device()
378 if (IS_ERR(ucontext)) in ib_uverbs_query_device()
379 return PTR_ERR(ucontext); in ib_uverbs_query_device()
386 copy_query_dev_fields(ucontext, &resp, &ucontext->device->attrs); in ib_uverbs_query_device()
397 struct ib_ucontext *ucontext; in ib_uverbs_query_port() local
400 ucontext = ib_uverbs_get_ucontext(attrs); in ib_uverbs_query_port()
401 if (IS_ERR(ucontext)) in ib_uverbs_query_port()
402 return PTR_ERR(ucontext); in ib_uverbs_query_port()
403 ib_dev = ucontext->device; in ib_uverbs_query_port()
3558 struct ib_ucontext *ucontext; in ib_uverbs_ex_query_device() local
3562 ucontext = ib_uverbs_get_ucontext(attrs); in ib_uverbs_ex_query_device()
3563 if (IS_ERR(ucontext)) in ib_uverbs_ex_query_device()
3564 return PTR_ERR(ucontext); in ib_uverbs_ex_query_device()
3565 ib_dev = ucontext->device; in ib_uverbs_ex_query_device()
3581 copy_query_dev_fields(ucontext, &resp.base, &attr); in ib_uverbs_ex_query_device()