Home
last modified time | relevance | path

Searched refs:uctx (Results 1 – 25 of 33) sorted by relevance

12

/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_context.c122 struct vmw_user_context *uctx) in vmw_context_cotables_unref() argument
130 spin_lock(&uctx->cotable_lock); in vmw_context_cotables_unref()
131 res = uctx->cotables[i]; in vmw_context_cotables_unref()
132 uctx->cotables[i] = NULL; in vmw_context_cotables_unref()
133 spin_unlock(&uctx->cotable_lock); in vmw_context_cotables_unref()
142 struct vmw_user_context *uctx = in vmw_hw_context_destroy() local
154 vmw_cmdbuf_res_man_destroy(uctx->man); in vmw_hw_context_destroy()
156 vmw_binding_state_kill(uctx->cbs); in vmw_hw_context_destroy()
163 vmw_context_cotables_unref(dev_priv, uctx); in vmw_hw_context_destroy()
186 struct vmw_user_context *uctx = in vmw_gb_context_init() local
[all …]
/linux/drivers/fwctl/
H A Dmain.c27 struct fwctl_uctx *uctx; member
58 struct fwctl_device *fwctl = ucmd->uctx->fwctl; in fwctl_cmd_info()
71 fwctl->ops->info(ucmd->uctx, &driver_info_len); in fwctl_cmd_info()
88 struct fwctl_device *fwctl = ucmd->uctx->fwctl; in fwctl_cmd_rpc()
125 ucmd->uctx, cmd->scope, inbuf, cmd->in_len, &out_len); in fwctl_cmd_rpc()
171 struct fwctl_uctx *uctx = filp->private_data; in fwctl_fops_ioctl() local
186 ucmd.uctx = uctx; in fwctl_fops_ioctl()
201 guard(rwsem_read)(&uctx->fwctl->registration_lock); in fwctl_fops_ioctl()
202 if (!uctx->fwctl->ops) in fwctl_fops_ioctl()
217 struct fwctl_uctx *uctx __free(kfree) = in fwctl_fops_open()
[all …]
/linux/drivers/scsi/qla2xxx/
H A Dqla_nvme.c244 struct qla_nvme_unsol_ctx *uctx = sp->priv; in qla_nvme_release_lsrsp_cmd_kref() local
248 if (!uctx) { in qla_nvme_release_lsrsp_cmd_kref()
253 spin_lock_irqsave(&uctx->cmd_lock, flags); in qla_nvme_release_lsrsp_cmd_kref()
254 uctx->sp = NULL; in qla_nvme_release_lsrsp_cmd_kref()
256 spin_unlock_irqrestore(&uctx->cmd_lock, flags); in qla_nvme_release_lsrsp_cmd_kref()
258 fd_rsp = uctx->fd_rsp; in qla_nvme_release_lsrsp_cmd_kref()
260 list_del(&uctx->elem); in qla_nvme_release_lsrsp_cmd_kref()
263 kfree(uctx); in qla_nvme_release_lsrsp_cmd_kref()
269 struct qla_nvme_unsol_ctx *uctx = in qla_nvme_lsrsp_complete() local
272 kref_put(&uctx->sp->cmd_kref, qla_nvme_release_lsrsp_cmd_kref); in qla_nvme_lsrsp_complete()
[all …]
H A Dqla_nvme.h41 struct qla_nvme_unsol_ctx *uctx; member
/linux/drivers/infiniband/hw/cxgb4/
H A Dresource.c108 u32 c4iw_get_cqid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx) in c4iw_get_cqid() argument
114 mutex_lock(&uctx->lock); in c4iw_get_cqid()
115 if (!list_empty(&uctx->cqids)) { in c4iw_get_cqid()
116 entry = list_entry(uctx->cqids.next, struct c4iw_qid_list, in c4iw_get_cqid()
133 list_add_tail(&entry->entry, &uctx->cqids); in c4iw_get_cqid()
144 list_add_tail(&entry->entry, &uctx->qpids); in c4iw_get_cqid()
150 list_add_tail(&entry->entry, &uctx->qpids); in c4iw_get_cqid()
154 mutex_unlock(&uctx->lock); in c4iw_get_cqid()
164 struct c4iw_dev_ucontext *uctx) in c4iw_put_cqid() argument
173 mutex_lock(&uctx->lock); in c4iw_put_cqid()
[all …]
H A Dcq.c38 struct c4iw_dev_ucontext *uctx, struct sk_buff *skb, in destroy_cq() argument
67 c4iw_put_cqid(rdev, cq->cqid, uctx); in destroy_cq()
71 struct c4iw_dev_ucontext *uctx, in create_cq() argument
77 int user = (uctx != &rdev->uctx); in create_cq()
83 ucontext = container_of(uctx, struct c4iw_ucontext, uctx); in create_cq()
85 cq->cqid = c4iw_get_cqid(rdev, uctx); in create_cq()
179 c4iw_put_cqid(rdev, cq->cqid, uctx); in create_cq()
991 ucontext ? &ucontext->uctx : &chp->cq.rdev->uctx, in c4iw_destroy_cq()
1080 ucontext ? &ucontext->uctx : &rhp->rdev.uctx, in c4iw_create_cq()
1157 ucontext ? &ucontext->uctx : &rhp->rdev.uctx, in c4iw_create_cq()
H A Dprovider.c73 c4iw_release_dev_ucontext(&rhp->rdev, &ucontext->uctx); in c4iw_dealloc_ucontext()
87 c4iw_init_dev_ucontext(&rhp->rdev, &context->uctx); in c4iw_alloc_ucontext()
/linux/security/selinux/
H A Dxfrm.c75 struct xfrm_user_sec_ctx *uctx, in selinux_xfrm_alloc_user() argument
82 if (ctxp == NULL || uctx == NULL || in selinux_xfrm_alloc_user()
83 uctx->ctx_doi != XFRM_SC_DOI_LSM || in selinux_xfrm_alloc_user()
84 uctx->ctx_alg != XFRM_SC_ALG_SELINUX) in selinux_xfrm_alloc_user()
87 str_len = uctx->ctx_len; in selinux_xfrm_alloc_user()
98 memcpy(ctx->ctx_str, &uctx[1], str_len); in selinux_xfrm_alloc_user()
280 struct xfrm_user_sec_ctx *uctx, in selinux_xfrm_policy_alloc() argument
283 return selinux_xfrm_alloc_user(ctxp, uctx, gfp); in selinux_xfrm_policy_alloc()
329 struct xfrm_user_sec_ctx *uctx) in selinux_xfrm_state_alloc() argument
331 return selinux_xfrm_alloc_user(&x->security, uctx, GFP_KERNEL); in selinux_xfrm_state_alloc()
/linux/drivers/infiniband/hw/hns/
H A Dhns_roce_cq.c41 void hns_roce_put_cq_bankid_for_uctx(struct hns_roce_ucontext *uctx) in hns_roce_put_cq_bankid_for_uctx() argument
43 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->ibucontext.device); in hns_roce_put_cq_bankid_for_uctx()
50 cq_table->ctx_num[uctx->cq_bank_id]--; in hns_roce_put_cq_bankid_for_uctx()
54 void hns_roce_get_cq_bankid_for_uctx(struct hns_roce_ucontext *uctx) in hns_roce_get_cq_bankid_for_uctx() argument
56 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->ibucontext.device); in hns_roce_get_cq_bankid_for_uctx()
75 uctx->cq_bank_id = bankid; in hns_roce_get_cq_bankid_for_uctx()
99 struct hns_roce_ucontext *uctx = udata ? in select_cq_bankid() local
104 return uctx ? uctx->cq_bank_id : 0; in select_cq_bankid()
281 struct hns_roce_ucontext *uctx; in alloc_cq_db() local
287 uctx = rdma_udata_to_drv_context(udata, in alloc_cq_db()
[all …]
H A Dhns_roce_srq.c408 struct hns_roce_ucontext *uctx; in free_srq_db() local
415 uctx = rdma_udata_to_drv_context(udata, in free_srq_db()
418 hns_roce_db_unmap_user(uctx, &srq->rdb); in free_srq_db()
429 struct hns_roce_ucontext *uctx; in alloc_srq_db() local
439 uctx = rdma_udata_to_drv_context(udata, in alloc_srq_db()
441 ret = hns_roce_db_map_user(uctx, ucmd.db_addr, in alloc_srq_db()
H A Dhns_roce_main.c402 static int hns_roce_alloc_uar_entry(struct ib_ucontext *uctx) in hns_roce_alloc_uar_entry() argument
404 struct hns_roce_ucontext *context = to_hr_ucontext(uctx); in hns_roce_alloc_uar_entry()
409 uctx, address, PAGE_SIZE, HNS_ROCE_MMAP_TYPE_DB); in hns_roce_alloc_uar_entry()
416 static int hns_roce_alloc_ucontext(struct ib_ucontext *uctx, in hns_roce_alloc_ucontext() argument
419 struct hns_roce_ucontext *context = to_hr_ucontext(uctx); in hns_roce_alloc_ucontext()
420 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->device); in hns_roce_alloc_ucontext()
463 ret = hns_roce_alloc_uar_entry(uctx); in hns_roce_alloc_ucontext()
515 static int hns_roce_mmap(struct ib_ucontext *uctx, struct vm_area_struct *vma) in hns_roce_mmap() argument
517 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->device); in hns_roce_mmap()
529 rdma_entry = rdma_user_mmap_entry_get_pgoff(uctx, vma->vm_pgoff); in hns_roce_mmap()
[all …]
H A Dhns_roce_qp.c837 struct hns_roce_ucontext *uctx = in qp_mmap_entry() local
846 hns_roce_user_mmap_entry_insert(&uctx->ibucontext, address, in qp_mmap_entry()
869 struct hns_roce_ucontext *uctx = rdma_udata_to_drv_context(udata, in alloc_user_qp_db() local
876 ret = hns_roce_db_map_user(uctx, ucmd->sdb_addr, &hr_qp->sdb); in alloc_user_qp_db()
887 ret = hns_roce_db_map_user(uctx, ucmd->db_addr, &hr_qp->rdb); in alloc_user_qp_db()
901 hns_roce_db_unmap_user(uctx, &hr_qp->sdb); in alloc_user_qp_db()
978 struct hns_roce_ucontext *uctx = rdma_udata_to_drv_context( in free_qp_db() local
983 hns_roce_db_unmap_user(uctx, &hr_qp->rdb); in free_qp_db()
985 hns_roce_db_unmap_user(uctx, &hr_qp->sdb); in free_qp_db()
1092 struct hns_roce_ucontext *uctx; in set_qp_param() local
[all …]
/linux/drivers/infiniband/hw/bnxt_re/
H A Dib_verbs.c631 bnxt_re_mmap_entry_insert(struct bnxt_re_ucontext *uctx, u64 mem_offset, in bnxt_re_mmap_entry_insert() argument
643 entry->uctx = uctx; in bnxt_re_mmap_entry_insert()
647 ret = rdma_user_mmap_entry_insert_exact(&uctx->ib_uctx, in bnxt_re_mmap_entry_insert()
655 ret = rdma_user_mmap_entry_insert(&uctx->ib_uctx, in bnxt_re_mmap_entry_insert()
858 struct bnxt_re_ucontext *uctx = rdma_udata_to_drv_context( in bnxt_re_create_ah() local
863 spin_lock_irqsave(&uctx->sh_lock, flag); in bnxt_re_create_ah()
864 wrptr = (u32 *)(uctx->shpg + BNXT_RE_AVID_OFFT); in bnxt_re_create_ah()
867 spin_unlock_irqrestore(&uctx->sh_lock, flag); in bnxt_re_create_ah()
1285 struct bnxt_re_ucontext *uctx) in bnxt_re_init_rq_attr() argument
1345 bnxt_re_init_sq_attr(struct bnxt_re_qp * qp,struct ib_qp_init_attr * init_attr,struct bnxt_re_ucontext * uctx,struct bnxt_re_qp_req * ureq) bnxt_re_init_sq_attr() argument
1403 bnxt_re_adjust_gsi_sq_attr(struct bnxt_re_qp * qp,struct ib_qp_init_attr * init_attr,struct bnxt_re_ucontext * uctx) bnxt_re_adjust_gsi_sq_attr() argument
1450 bnxt_re_init_qp_attr(struct bnxt_re_qp * qp,struct bnxt_re_pd * pd,struct ib_qp_init_attr * init_attr,struct bnxt_re_ucontext * uctx,struct bnxt_re_qp_req * ureq) bnxt_re_init_qp_attr() argument
1642 struct bnxt_re_ucontext *uctx; bnxt_re_create_qp() local
1876 struct bnxt_re_ucontext *uctx; bnxt_re_create_srq() local
2269 struct bnxt_re_ucontext *uctx = bnxt_re_modify_qp() local
3130 struct bnxt_re_ucontext *uctx = bnxt_re_create_cq() local
3259 struct bnxt_re_ucontext *uctx = NULL; bnxt_re_resize_cq() local
4338 struct bnxt_re_ucontext *uctx = bnxt_re_alloc_ucontext() local
4427 struct bnxt_re_ucontext *uctx = container_of(ib_uctx, bnxt_re_dealloc_ucontext() local
4563 struct bnxt_re_ucontext *uctx = container_of(ib_uctx, bnxt_re_mmap() local
4665 struct bnxt_re_ucontext *uctx; UVERBS_HANDLER() local
4679 struct bnxt_re_ucontext *uctx; UVERBS_HANDLER() local
4758 struct bnxt_re_ucontext *uctx = entry->uctx; alloc_page_obj_cleanup() local
4821 struct bnxt_re_ucontext *uctx; UVERBS_HANDLER() local
[all...]
/linux/tools/testing/selftests/kvm/arm64/
H A Dhost_sve.c28 ucontext_t *uctx = ctx; in handle_sigill() local
35 uctx->uc_mcontext.pc += 4; in handle_sigill()
/linux/tools/testing/selftests/powerpc/pmu/sampling_tests/
H A Dmmcr2_fcs_fch_test.c21 ucontext_t *uctx = data; in sig_usr2_handler() local
23 is_hv = !!(uctx->uc_mcontext.gp_regs[PT_MSR] & MSR_HV); in sig_usr2_handler()
/linux/security/selinux/include/
H A Dxfrm.h17 struct xfrm_user_sec_ctx *uctx, gfp_t gfp);
23 struct xfrm_user_sec_ctx *uctx);
/linux/drivers/infiniband/hw/ocrdma/
H A Docrdma_ah.c196 if ((pd->uctx) && (pd->uctx->ah_tbl.va)) { in ocrdma_create_ah()
197 ahid_addr = pd->uctx->ah_tbl.va + rdma_ah_get_dlid(attr); in ocrdma_create_ah()
H A Docrdma.h346 struct ocrdma_ucontext *uctx; member
/linux/net/key/
H A Daf_key.c466 struct xfrm_user_sec_ctx *uctx = NULL; in pfkey_sadb2xfrm_user_sec_ctx() local
469 uctx = kmalloc((sizeof(*uctx)+ctx_size), gfp); in pfkey_sadb2xfrm_user_sec_ctx()
471 if (!uctx) in pfkey_sadb2xfrm_user_sec_ctx()
474 uctx->len = pfkey_sec_ctx_len(sec_ctx); in pfkey_sadb2xfrm_user_sec_ctx()
475 uctx->exttype = sec_ctx->sadb_x_sec_exttype; in pfkey_sadb2xfrm_user_sec_ctx()
476 uctx->ctx_doi = sec_ctx->sadb_x_ctx_doi; in pfkey_sadb2xfrm_user_sec_ctx()
477 uctx->ctx_alg = sec_ctx->sadb_x_ctx_alg; in pfkey_sadb2xfrm_user_sec_ctx()
478 uctx->ctx_len = sec_ctx->sadb_x_ctx_len; in pfkey_sadb2xfrm_user_sec_ctx()
479 memcpy(uctx in pfkey_sadb2xfrm_user_sec_ctx()
1154 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_msg2xfrm_state() local
2300 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_spdadd() local
2402 struct xfrm_user_sec_ctx *uctx = pfkey_sadb2xfrm_user_sec_ctx(sec_ctx, GFP_KERNEL); pfkey_spddelete() local
3326 struct xfrm_user_sec_ctx *uctx; pfkey_compile_policy() local
[all...]
/linux/drivers/cxl/core/
H A Dfeatures.c359 static int cxlctl_open_uctx(struct fwctl_uctx *uctx) in cxlctl_open_uctx() argument
364 static void cxlctl_close_uctx(struct fwctl_uctx *uctx) in cxlctl_close_uctx() argument
645 static void *cxlctl_fw_rpc(struct fwctl_uctx *uctx, enum fwctl_rpc_scope scope, in cxlctl_fw_rpc() argument
648 struct fwctl_device *fwctl_dev = uctx->fwctl; in cxlctl_fw_rpc()
/linux/security/
H A Dsecurity.c374 int lsm_fill_user_ctx(struct lsm_ctx __user *uctx, u32 *uctx_len, in lsm_fill_user_ctx() argument
389 if (!uctx) in lsm_fill_user_ctx()
403 if (copy_to_user(uctx, nctx, nctx_len)) in lsm_fill_user_ctx()
3625 int security_getselfattr(unsigned int attr, struct lsm_ctx __user *uctx, in security_getselfattr() argument
3630 u8 __user *base = (u8 __user *)uctx; in security_getselfattr()
3650 if (flags != LSM_FLAG_SINGLE || !uctx) in security_getselfattr()
3652 if (copy_from_user(&lctx, uctx, sizeof(lctx))) in security_getselfattr()
3671 uctx = (struct lsm_ctx __user *)(base + total); in security_getselfattr()
3672 rc = scall->hl->hook.getselfattr(attr, uctx, &entrysize, flags); in security_getselfattr()
3716 int security_setselfattr(unsigned int attr, struct lsm_ctx __user *uctx, in security_setselfattr() argument
[all …]
/linux/net/xfrm/
H A Dxfrm_user.c117 struct xfrm_user_sec_ctx *uctx; in verify_sec_ctx_len() local
122 uctx = nla_data(rt); in verify_sec_ctx_len()
123 if (uctx->len > nla_len(rt) || in verify_sec_ctx_len()
124 uctx->len != (sizeof(struct xfrm_user_sec_ctx) + uctx->ctx_len)) { in verify_sec_ctx_len()
1155 struct xfrm_user_sec_ctx *uctx; in copy_sec_ctx() local
1157 int ctx_size = sizeof(*uctx) + s->ctx_len; in copy_sec_ctx()
1163 uctx = nla_data(attr); in copy_sec_ctx()
1164 uctx->exttype = XFRMA_SEC_CTX; in copy_sec_ctx()
1165 uctx->len = ctx_size; in copy_sec_ctx()
1166 uctx->ctx_doi = s->ctx_doi; in copy_sec_ctx()
[all …]
H A Dxfrm_state.c1946 struct xfrm_user_sec_ctx *uctx; in clone_security() local
1947 int size = sizeof(*uctx) + security->ctx_len; in clone_security()
1950 uctx = kmalloc(size, GFP_KERNEL); in clone_security()
1951 if (!uctx) in clone_security()
1954 uctx->exttype = XFRMA_SEC_CTX; in clone_security()
1955 uctx->len = size; in clone_security()
1956 uctx->ctx_doi = security->ctx_doi; in clone_security()
1957 uctx->ctx_alg = security->ctx_alg; in clone_security()
1958 uctx->ctx_len = security->ctx_len; in clone_security()
1959 memcpy(uctx + 1, security->ctx_str, security->ctx_len); in clone_security()
[all …]
/linux/usr/include/
H A DMakefile64 no-header-test += asm/uctx.h
/linux/drivers/infiniband/hw/mlx5/
H A Dmain.c1961 static int set_ucontext_resp(struct ib_ucontext *uctx, in set_ucontext_resp() argument
1964 struct ib_device *ibdev = uctx->device; in set_ucontext_resp()
1966 struct mlx5_ib_ucontext *context = to_mucontext(uctx); in set_ucontext_resp()
2045 static int mlx5_ib_alloc_ucontext(struct ib_ucontext *uctx, in mlx5_ib_alloc_ucontext() argument
2048 struct ib_device *ibdev = uctx->device; in mlx5_ib_alloc_ucontext()
2052 struct mlx5_ib_ucontext *context = to_mucontext(uctx); in mlx5_ib_alloc_ucontext()
2087 err = mlx5_ib_devx_create(dev, true, uctx->enabled_caps); in mlx5_ib_alloc_ucontext()
2092 if (uctx_rdma_ctrl_is_enabled(uctx->enabled_caps)) { in mlx5_ib_alloc_ucontext()
2148 err = set_ucontext_resp(uctx, &resp); in mlx5_ib_alloc_ucontext()
2186 uctx_rdma_ctrl_is_enabled(uctx->enabled_caps)) in mlx5_ib_alloc_ucontext()

12