| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_context.c | 122 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 D | main.c | 27 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/fwctl/mlx5/ |
| H A D | main.c | 19 struct fwctl_uctx uctx; member 97 void *uctx; in mlx5ctl_alloc_uid() local 101 uctx = MLX5_ADDR_OF(create_uctx_in, in, uctx); in mlx5ctl_alloc_uid() 105 MLX5_SET(uctx, uctx, cap, cap); in mlx5ctl_alloc_uid() 129 static int mlx5ctl_open_uctx(struct fwctl_uctx *uctx) in mlx5ctl_open_uctx() argument 132 container_of(uctx, struct mlx5ctl_uctx, uctx); in mlx5ctl_open_uctx() 134 container_of(uctx->fwctl, struct mlx5ctl_dev, fwctl); in mlx5ctl_open_uctx() 154 static void mlx5ctl_close_uctx(struct fwctl_uctx *uctx) in mlx5ctl_close_uctx() argument 157 container_of(uctx->fwctl, struct mlx5ctl_dev, fwctl); in mlx5ctl_close_uctx() 159 container_of(uctx, struct mlx5ctl_uctx, uctx); in mlx5ctl_close_uctx() [all …]
|
| /linux/drivers/scsi/qla2xxx/ |
| H A D | qla_nvme.c | 244 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 …]
|
| /linux/drivers/infiniband/hw/cxgb4/ |
| H A D | resource.c | 108 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 D | cq.c | 38 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 D | qp.c | 151 struct c4iw_dev_ucontext *uctx, int has_rq) in destroy_qp() argument 159 c4iw_put_qpid(rdev, wq->sq.qid, uctx); in destroy_qp() 167 c4iw_put_qpid(rdev, wq->rq.qid, uctx); in destroy_qp() 201 struct c4iw_dev_ucontext *uctx, in create_qp() argument 205 int user = (uctx != &rdev->uctx); in create_qp() 213 wq->sq.qid = c4iw_get_qpid(rdev, uctx); in create_qp() 218 wq->rq.qid = c4iw_get_qpid(rdev, uctx); in create_qp() 405 c4iw_put_qpid(rdev, wq->rq.qid, uctx); in create_qp() 407 c4iw_put_qpid(rdev, wq->sq.qid, uctx); in create_qp() 2108 ucontext ? &ucontext->uctx : &rhp->rdev.uctx, !qhp->srq); in c4iw_destroy_qp() [all …]
|
| H A D | device.c | 748 struct c4iw_dev_ucontext *uctx) in c4iw_release_dev_ucontext() argument 753 mutex_lock(&uctx->lock); in c4iw_release_dev_ucontext() 754 list_for_each_safe(pos, nxt, &uctx->qpids) { in c4iw_release_dev_ucontext() 767 list_for_each_safe(pos, nxt, &uctx->cqids) { in c4iw_release_dev_ucontext() 772 mutex_unlock(&uctx->lock); in c4iw_release_dev_ucontext() 776 struct c4iw_dev_ucontext *uctx) in c4iw_init_dev_ucontext() argument 778 INIT_LIST_HEAD(&uctx->qpids); in c4iw_init_dev_ucontext() 779 INIT_LIST_HEAD(&uctx->cqids); in c4iw_init_dev_ucontext() 780 mutex_init(&uctx->lock); in c4iw_init_dev_ucontext() 789 c4iw_init_dev_ucontext(rdev, &rdev->uctx); in c4iw_rdev_open() [all …]
|
| /linux/drivers/infiniband/hw/ocrdma/ |
| H A D | ocrdma_verbs.c | 193 static int ocrdma_add_mmap(struct ocrdma_ucontext *uctx, u64 phy_addr, in ocrdma_add_mmap() argument 205 mutex_lock(&uctx->mm_list_lock); in ocrdma_add_mmap() 206 list_add_tail(&mm->entry, &uctx->mm_head); in ocrdma_add_mmap() 207 mutex_unlock(&uctx->mm_list_lock); in ocrdma_add_mmap() 211 static void ocrdma_del_mmap(struct ocrdma_ucontext *uctx, u64 phy_addr, in ocrdma_del_mmap() argument 216 mutex_lock(&uctx->mm_list_lock); in ocrdma_del_mmap() 217 list_for_each_entry_safe(mm, tmp, &uctx->mm_head, entry) { in ocrdma_del_mmap() 225 mutex_unlock(&uctx->mm_list_lock); in ocrdma_del_mmap() 228 static bool ocrdma_search_mmap(struct ocrdma_ucontext *uctx, u64 phy_addr, in ocrdma_search_mmap() argument 234 mutex_lock(&uctx->mm_list_lock); in ocrdma_search_mmap() [all …]
|
| H A D | ocrdma_ah.c | 196 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()
|
| /linux/security/selinux/ |
| H A D | xfrm.c | 75 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/fwctl/pds/ |
| H A D | main.c | 21 struct fwctl_uctx uctx; member 42 static int pdsfc_open_uctx(struct fwctl_uctx *uctx) in pdsfc_open_uctx() argument 44 struct pdsfc_dev *pdsfc = container_of(uctx->fwctl, struct pdsfc_dev, fwctl); in pdsfc_open_uctx() 45 struct pdsfc_uctx *pdsfc_uctx = container_of(uctx, struct pdsfc_uctx, uctx); in pdsfc_open_uctx() 52 static void pdsfc_close_uctx(struct fwctl_uctx *uctx) in pdsfc_close_uctx() argument 56 static void *pdsfc_info(struct fwctl_uctx *uctx, size_t *length) in pdsfc_info() argument 58 struct pdsfc_uctx *pdsfc_uctx = container_of(uctx, struct pdsfc_uctx, uctx); in pdsfc_info() 350 static void *pdsfc_fw_rpc(struct fwctl_uctx *uctx, enum fwctl_rpc_scope scope, in pdsfc_fw_rpc() argument 353 struct pdsfc_dev *pdsfc = container_of(uctx->fwctl, struct pdsfc_dev, fwctl); in pdsfc_fw_rpc() 354 struct device *dev = &uctx->fwctl->dev; in pdsfc_fw_rpc()
|
| /linux/drivers/infiniband/hw/bnxt_re/ |
| H A D | ib_verbs.c | 648 bnxt_re_mmap_entry_insert(struct bnxt_re_ucontext *uctx, u64 mem_offset, in bnxt_re_mmap_entry_insert() argument 660 entry->uctx = uctx; in bnxt_re_mmap_entry_insert() 664 ret = rdma_user_mmap_entry_insert_exact(&uctx->ib_uctx, in bnxt_re_mmap_entry_insert() 672 ret = rdma_user_mmap_entry_insert(&uctx->ib_uctx, in bnxt_re_mmap_entry_insert() 875 struct bnxt_re_ucontext *uctx = rdma_udata_to_drv_context( in bnxt_re_create_ah() local 880 spin_lock_irqsave(&uctx->sh_lock, flag); in bnxt_re_create_ah() 881 wrptr = (u32 *)(uctx->shpg + BNXT_RE_AVID_OFFT); in bnxt_re_create_ah() 884 spin_unlock_irqrestore(&uctx->sh_lock, flag); in bnxt_re_create_ah() 1302 struct bnxt_re_ucontext *uctx) in bnxt_re_init_rq_attr() argument 1331 entries = bnxt_re_init_depth(init_attr->cap.max_recv_wr + 1, uctx); in bnxt_re_init_rq_attr() [all …]
|
| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | host_sve.c | 28 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 D | mmcr2_fcs_fch_test.c | 21 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 D | xfrm.h | 17 struct xfrm_user_sec_ctx *uctx, gfp_t gfp); 23 struct xfrm_user_sec_ctx *uctx);
|
| /linux/drivers/infiniband/hw/hns/ |
| H A D | hns_roce_srq.c | 408 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 D | hns_roce_main.c | 407 static int hns_roce_alloc_uar_entry(struct ib_ucontext *uctx) in hns_roce_alloc_uar_entry() argument 409 struct hns_roce_ucontext *context = to_hr_ucontext(uctx); in hns_roce_alloc_uar_entry() 414 uctx, address, PAGE_SIZE, HNS_ROCE_MMAP_TYPE_DB); in hns_roce_alloc_uar_entry() 421 static int hns_roce_alloc_ucontext(struct ib_ucontext *uctx, in hns_roce_alloc_ucontext() argument 424 struct hns_roce_ucontext *context = to_hr_ucontext(uctx); in hns_roce_alloc_ucontext() 425 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->device); in hns_roce_alloc_ucontext() 468 ret = hns_roce_alloc_uar_entry(uctx); in hns_roce_alloc_ucontext() 520 static int hns_roce_mmap(struct ib_ucontext *uctx, struct vm_area_struct *vma) in hns_roce_mmap() argument 522 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->device); in hns_roce_mmap() 534 rdma_entry = rdma_user_mmap_entry_get_pgoff(uctx, vma->vm_pgoff); in hns_roce_mmap() [all …]
|
| /linux/drivers/infiniband/hw/erdma/ |
| H A D | erdma_verbs.c | 39 static int create_qp_cmd(struct erdma_ucontext *uctx, struct erdma_qp *qp) in create_qp_cmd() argument 118 if (uctx->ext_db.enable) { in create_qp_cmd() 123 uctx->ext_db.sdb_off) | in create_qp_cmd() 125 uctx->ext_db.rdb_off); in create_qp_cmd() 192 static int create_cq_cmd(struct erdma_ucontext *uctx, struct erdma_cq *cq) in create_cq_cmd() argument 243 if (uctx->ext_db.enable) { in create_cq_cmd() 247 uctx->ext_db.cdb_off); in create_cq_cmd() 291 erdma_user_mmap_entry_insert(struct erdma_ucontext *uctx, void *address, in erdma_user_mmap_entry_insert() argument 305 ret = rdma_user_mmap_entry_insert(&uctx->ibucontext, &entry->rdma_entry, in erdma_user_mmap_entry_insert() 938 static int init_user_qp(struct erdma_qp *qp, struct erdma_ucontext *uctx, in init_user_qp() argument [all …]
|
| /linux/drivers/infiniband/sw/siw/ |
| H A D | siw_verbs.c | 56 struct siw_ucontext *uctx = to_siw_ctx(ctx); in siw_mmap() local 69 rdma_entry = rdma_user_mmap_entry_get(&uctx->base_ucontext, vma); in siw_mmap() 71 siw_dbg(&uctx->sdev->base_dev, "mmap lookup failed: %lu, %#zx\n", in siw_mmap() 124 struct siw_ucontext *uctx = to_siw_ctx(base_ctx); in siw_dealloc_ucontext() local 126 atomic_dec(&uctx->sdev->num_ctx); in siw_dealloc_ucontext() 273 siw_mmap_entry_insert(struct siw_ucontext *uctx, in siw_mmap_entry_insert() argument 286 rv = rdma_user_mmap_entry_insert(&uctx->base_ucontext, in siw_mmap_entry_insert() 316 struct siw_ucontext *uctx = in siw_create_qp() local 451 siw_mmap_entry_insert(uctx, qp->sendq, in siw_create_qp() 462 siw_mmap_entry_insert(uctx, qp->recvq, in siw_create_qp() [all …]
|
| /linux/net/key/ |
| H A D | af_key.c | 466 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 + 1, sec_ctx + 1, in pfkey_sadb2xfrm_user_sec_ctx() 480 uctx->ctx_len); in pfkey_sadb2xfrm_user_sec_ctx() [all …]
|
| /linux/drivers/infiniband/hw/usnic/ |
| H A D | usnic_ib_verbs.c | 637 int usnic_ib_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata) in usnic_ib_alloc_ucontext() argument 639 struct ib_device *ibdev = uctx->device; in usnic_ib_alloc_ucontext() 640 struct usnic_ib_ucontext *context = to_ucontext(uctx); in usnic_ib_alloc_ucontext() 667 struct usnic_ib_ucontext *uctx = to_ucontext(context); in usnic_ib_mmap() local 686 list_for_each_entry(qp_grp, &uctx->qp_grp_list, link) { in usnic_ib_mmap()
|
| /linux/drivers/cxl/core/ |
| H A D | features.c | 359 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 D | security.c | 360 * @uctx: a userspace LSM context to be filled 361 * @uctx_len: available uctx size (input), used uctx size (output) 367 * Fill all of the fields in a userspace lsm_ctx structure. If @uctx is NULL 374 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() 3612 * @uctx: the user-space destination for the information, or NULL 3618 * A NULL value for @uctx can be used to get both the number of attributes 3625 int security_getselfattr(unsigned int attr, struct lsm_ctx __user *uctx, in security_getselfattr() argument 3716 security_setselfattr(unsigned int attr,struct lsm_ctx __user * uctx,u32 size,u32 flags) security_setselfattr() argument [all...] |
| /linux/net/xfrm/ |
| H A D | xfrm_user.c | 117 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 …]
|