Lines Matching refs:ucontext
75 struct ib_ucontext *ucontext; in ib_uverbs_get_context() local
95 if (file->ucontext) { in ib_uverbs_get_context()
109 ucontext = ib_dev->alloc_ucontext(ib_dev, &udata); in ib_uverbs_get_context()
110 if (IS_ERR(ucontext)) { in ib_uverbs_get_context()
111 ret = PTR_ERR(ucontext); in ib_uverbs_get_context()
115 ucontext->device = ib_dev; in ib_uverbs_get_context()
116 ucontext->cg_obj = cg_obj; in ib_uverbs_get_context()
118 ucontext->ufile = file; in ib_uverbs_get_context()
121 ucontext->tgid = get_task_pid(current->group_leader, PIDTYPE_PID); in ib_uverbs_get_context()
123 ucontext->closing = 0; in ib_uverbs_get_context()
124 ucontext->cleanup_retryable = false; in ib_uverbs_get_context()
127 ucontext->umem_tree = RB_ROOT_CACHED; in ib_uverbs_get_context()
128 init_rwsem(&ucontext->umem_rwsem); in ib_uverbs_get_context()
129 ucontext->odp_mrs_count = 0; in ib_uverbs_get_context()
130 INIT_LIST_HEAD(&ucontext->no_private_counters); in ib_uverbs_get_context()
133 ucontext->invalidate_range = NULL; in ib_uverbs_get_context()
161 smp_store_release(&file->ucontext, ucontext); in ib_uverbs_get_context()
175 put_pid(ucontext->tgid); in ib_uverbs_get_context()
176 ib_dev->dealloc_ucontext(ucontext); in ib_uverbs_get_context()
186 static void copy_query_dev_fields(struct ib_ucontext *ucontext, in copy_query_dev_fields() argument
190 struct ib_device *ib_dev = ucontext->device; in copy_query_dev_fields()
240 struct ib_ucontext *ucontext; in ib_uverbs_query_device() local
242 ucontext = ib_uverbs_get_ucontext(file); in ib_uverbs_query_device()
243 if (IS_ERR(ucontext)) in ib_uverbs_query_device()
244 return PTR_ERR(ucontext); in ib_uverbs_query_device()
253 copy_query_dev_fields(ucontext, &resp, &ucontext->device->attrs); in ib_uverbs_query_device()
290 struct ib_ucontext *ucontext; in ib_uverbs_query_port() local
293 ucontext = ib_uverbs_get_ucontext(file); in ib_uverbs_query_port()
294 if (IS_ERR(ucontext)) in ib_uverbs_query_port()
295 return PTR_ERR(ucontext); in ib_uverbs_query_port()
296 ib_dev = ucontext->device; in ib_uverbs_query_port()
3988 struct ib_ucontext *ucontext; in ib_uverbs_ex_query_device() local
3992 ucontext = ib_uverbs_get_ucontext(file); in ib_uverbs_ex_query_device()
3993 if (IS_ERR(ucontext)) in ib_uverbs_ex_query_device()
3994 return PTR_ERR(ucontext); in ib_uverbs_ex_query_device()
3995 ib_dev = ucontext->device; in ib_uverbs_ex_query_device()
4022 copy_query_dev_fields(ucontext, &resp.base, &attr); in ib_uverbs_ex_query_device()