Home
last modified time | relevance | path

Searched refs:ucmd (Results 1 – 25 of 39) sorted by relevance

12

/drivers/iommu/iommufd/
A Dioas.c40 struct iommu_ioas_alloc *cmd = ucmd->cmd; in iommufd_ioas_alloc_ioctl()
47 ioas = iommufd_ioas_alloc(ucmd->ictx); in iommufd_ioas_alloc_ioctl()
52 rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd)); in iommufd_ioas_alloc_ioctl()
56 down_read(&ucmd->ictx->ioas_creation_lock); in iommufd_ioas_alloc_ioctl()
58 up_read(&ucmd->ictx->ioas_creation_lock); in iommufd_ioas_alloc_ioctl()
112 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_ioas_iova_ranges()
252 struct iommu_ioas_map *cmd = ucmd->cmd; in iommufd_ioas_map()
291 struct iommu_ioas_copy *cmd = ucmd->cmd; in iommufd_ioas_copy()
348 struct iommu_ioas_unmap *cmd = ucmd->cmd; in iommufd_ioas_unmap()
522 struct iommufd_ctx *ictx = ucmd->ictx; in iommufd_ioas_change_process()
[all …]
A Diommufd_private.h162 if (copy_to_user(ucmd->ubuffer, ucmd->cmd, in iommufd_ucmd_respond()
163 min_t(size_t, ucmd->user_size, cmd_len))) in iommufd_ucmd_respond()
308 __iommufd_object_alloc_ucmd(ucmd, ptr, type, obj)
343 int iommufd_ioas_map(struct iommufd_ucmd *ucmd);
346 int iommufd_ioas_copy(struct iommufd_ucmd *ucmd);
347 int iommufd_ioas_unmap(struct iommufd_ucmd *ucmd);
348 int iommufd_ioas_option(struct iommufd_ucmd *ucmd);
352 int iommufd_vfio_ioas(struct iommufd_ucmd *ucmd);
448 int iommufd_hwpt_alloc(struct iommufd_ucmd *ucmd);
506 int iommufd_get_hw_info(struct iommufd_ucmd *ucmd);
[all …]
A Dselftest.c123 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_test_syz_conv_iova_id()
1164 sobj->idev.ictx = ucmd->ictx; in iommufd_test_mock_domain()
1535 struct iommu_test_cmd *cmd = ucmd->cmd; in iommufd_test_create_access()
1556 ucmd->ictx, in iommufd_test_create_access()
1629 struct iommu_test_cmd *cmd = ucmd->cmd; in iommufd_test_access_pages()
1724 struct iommu_test_cmd *cmd = ucmd->cmd; in iommufd_test_access_rw()
1784 struct iommu_test_cmd *cmd = ucmd->cmd; in iommufd_test_dirty()
1946 hwpt = iommufd_get_hwpt(ucmd, hwpt_id); in iommufd_test_pasid_check_hwpt()
2036 struct iommu_test_cmd *cmd = ucmd->cmd; in iommufd_test()
2051 ucmd, cmd->id, cmd->check_map.iova, in iommufd_test()
[all …]
A Dviommu.c19 struct iommu_viommu_alloc *cmd = ucmd->cmd; in iommufd_viommu_alloc_ioctl()
35 idev = iommufd_get_device(ucmd, cmd->dev_id); in iommufd_viommu_alloc_ioctl()
72 ucmd, viommu_size, IOMMUFD_OBJ_VIOMMU); in iommufd_viommu_alloc_ioctl()
80 viommu->ictx = ucmd->ictx; in iommufd_viommu_alloc_ioctl()
104 rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd)); in iommufd_viommu_alloc_ioctl()
109 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_viommu_alloc_ioctl()
145 struct iommu_vdevice_alloc *cmd = ucmd->cmd; in iommufd_vdevice_alloc_ioctl()
161 idev = iommufd_get_device(ucmd, cmd->dev_id); in iommufd_vdevice_alloc_ioctl()
198 ucmd->ictx, vdev_size, IOMMUFD_OBJ_VDEVICE); in iommufd_vdevice_alloc_ioctl()
246 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_vdevice_alloc_ioctl()
[all …]
A Dhw_pagetable.c334 int iommufd_hwpt_alloc(struct iommufd_ucmd *ucmd) in iommufd_hwpt_alloc() argument
336 struct iommu_hwpt_alloc *cmd = ucmd->cmd; in iommufd_hwpt_alloc()
354 idev = iommufd_get_device(ucmd, cmd->dev_id); in iommufd_hwpt_alloc()
381 ucmd->ictx, in iommufd_hwpt_alloc()
414 fault = iommufd_get_fault(ucmd, cmd->fault_id); in iommufd_hwpt_alloc()
426 rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd)); in iommufd_hwpt_alloc()
438 iommufd_put_object(ucmd->ictx, pt_obj); in iommufd_hwpt_alloc()
440 iommufd_put_object(ucmd->ictx, &idev->obj); in iommufd_hwpt_alloc()
494 struct iommu_hwpt_invalidate *cmd = ucmd->cmd; in iommufd_hwpt_invalidate()
548 iommufd_put_object(ucmd->ictx, pt_obj); in iommufd_hwpt_invalidate()
[all …]
A Dmain.c72 if (WARN_ON(ucmd->new_obj)) in _iommufd_object_alloc_ucmd()
88 ucmd->new_obj = new_obj; in _iommufd_object_alloc_ucmd()
377 rc = iommufd_ioas_option(ucmd); in iommufd_option()
481 struct iommufd_ucmd ucmd = {}; in iommufd_fops_ioctl() local
491 ucmd.ictx = ictx; in iommufd_fops_ioctl()
493 ret = get_user(ucmd.user_size, (u32 __user *)ucmd.ubuffer); in iommufd_fops_ioctl()
503 ucmd.cmd = &buf; in iommufd_fops_ioctl()
504 ret = copy_struct_from_user(ucmd.cmd, op->size, ucmd.ubuffer, in iommufd_fops_ioctl()
505 ucmd.user_size); in iommufd_fops_ioctl()
508 ret = op->execute(&ucmd); in iommufd_fops_ioctl()
[all …]
A Dvfio_compat.c123 int iommufd_vfio_ioas(struct iommufd_ucmd *ucmd) in iommufd_vfio_ioas() argument
125 struct iommu_vfio_ioas *cmd = ucmd->cmd; in iommufd_vfio_ioas()
132 ioas = get_compat_ioas(ucmd->ictx); in iommufd_vfio_ioas()
136 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_vfio_ioas()
143 xa_lock(&ucmd->ictx->objects); in iommufd_vfio_ioas()
144 ucmd->ictx->vfio_ioas = ioas; in iommufd_vfio_ioas()
145 xa_unlock(&ucmd->ictx->objects); in iommufd_vfio_ioas()
146 iommufd_put_object(ucmd->ictx, &ioas->obj); in iommufd_vfio_ioas()
150 xa_lock(&ucmd->ictx->objects); in iommufd_vfio_ioas()
151 ucmd->ictx->vfio_ioas = NULL; in iommufd_vfio_ioas()
[all …]
A Deventq.c420 int iommufd_fault_alloc(struct iommufd_ucmd *ucmd) in iommufd_fault_alloc() argument
422 struct iommu_fault_alloc *cmd = ucmd->cmd; in iommufd_fault_alloc()
439 ucmd->ictx, &iommufd_fault_fops); in iommufd_fault_alloc()
446 rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd)); in iommufd_fault_alloc()
479 int iommufd_veventq_alloc(struct iommufd_ucmd *ucmd) in iommufd_veventq_alloc() argument
481 struct iommu_veventq_alloc *cmd = ucmd->cmd; in iommufd_veventq_alloc()
493 viommu = iommufd_get_viommu(ucmd, cmd->viommu_id); in iommufd_veventq_alloc()
504 veventq = __iommufd_object_alloc(ucmd->ictx, veventq, in iommufd_veventq_alloc()
520 ucmd->ictx, &iommufd_veventq_fops); in iommufd_veventq_alloc()
529 rc = iommufd_ucmd_respond(ucmd, sizeof(*cmd)); in iommufd_veventq_alloc()
[all …]
/drivers/fwctl/
A Dmain.c35 if (copy_to_user(ucmd->ubuffer, ucmd->cmd, in ucmd_respond()
59 struct fwctl_info *cmd = ucmd->cmd; in fwctl_cmd_info()
89 struct fwctl_rpc *cmd = ucmd->cmd; in fwctl_cmd_rpc()
173 struct fwctl_ucmd ucmd = {}; in fwctl_fops_ioctl() local
186 ucmd.uctx = uctx; in fwctl_fops_ioctl()
187 ucmd.cmd = &buf; in fwctl_fops_ioctl()
188 ucmd.ubuffer = (void __user *)arg; in fwctl_fops_ioctl()
189 ret = get_user(ucmd.user_size, (u32 __user *)ucmd.ubuffer); in fwctl_fops_ioctl()
196 ret = copy_struct_from_user(ucmd.cmd, op->size, ucmd.ubuffer, in fwctl_fops_ioctl()
197 ucmd.user_size); in fwctl_fops_ioctl()
[all …]
/drivers/infiniband/hw/mana/
A Dwq.c14 struct mana_ib_create_wq ucmd = {}; in mana_ib_create_wq() local
18 if (udata->inlen < sizeof(ucmd)) in mana_ib_create_wq()
21 err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen)); in mana_ib_create_wq()
32 ibdev_dbg(&mdev->ib_dev, "ucmd wq_buf_addr 0x%llx\n", ucmd.wq_buf_addr); in mana_ib_create_wq()
34 err = mana_ib_create_queue(mdev, ucmd.wq_buf_addr, ucmd.wq_buf_size, &wq->queue); in mana_ib_create_wq()
42 wq->wq_buf_size = ucmd.wq_buf_size; in mana_ib_create_wq()
A Dqp.c117 ret = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen)); in mana_ib_create_qp_rss()
150 ucmd.rx_hash_function); in mana_ib_create_qp_rss()
155 port = ucmd.port; in mana_ib_create_qp_rss()
229 ucmd.rx_hash_key_len, in mana_ib_create_qp_rss()
230 ucmd.rx_hash_key); in mana_ib_create_qp_rss()
289 err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen)); in mana_ib_create_qp_raw()
310 port = ucmd.port; in mana_ib_create_qp_raw()
327 ucmd.sq_buf_addr, ucmd.port); in mana_ib_create_qp_raw()
329 err = mana_ib_create_queue(mdev, ucmd.sq_buf_addr, ucmd.sq_buf_size, &qp->raw_sq); in mana_ib_create_qp_raw()
545 err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen)); in mana_ib_create_rc_qp()
[all …]
A Dcq.c16 struct mana_ib_create_cq ucmd = {}; in mana_ib_create_cq() local
32 err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen)); in mana_ib_create_cq()
38 is_rnic_cq = !!(ucmd.flags & MANA_IB_CREATE_RNIC_CQ); in mana_ib_create_cq()
47 err = mana_ib_create_queue(mdev, ucmd.buf_addr, cq->cqe * COMP_ENTRY_SIZE, in mana_ib_create_cq()
/drivers/infiniband/hw/mthca/
A Dmthca_provider.c405 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) in mthca_create_srq()
410 ucmd.db_page); in mthca_create_srq()
474 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) in mthca_create_qp()
479 ucmd.sq_db_index, in mthca_create_qp()
480 ucmd.sq_db_page); in mthca_create_qp()
486 ucmd.rq_db_index, in mthca_create_qp()
596 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) in mthca_create_cq()
722 if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd)) { in mthca_resize_cq()
726 lkey = ucmd.lkey; in mthca_resize_cq()
852 ucmd.mr_attrs = 0; in mthca_reg_user_mr()
[all …]
/drivers/infiniband/hw/mlx5/
A Dqp.c452 if (ucmd) { in set_rq_size()
454 if (ucmd->rq_wqe_shift > BITS_PER_BYTE * sizeof(ucmd->rq_wqe_shift)) in set_rq_size()
650 if (ucmd->sq_wqe_count && !is_power_of_2(ucmd->sq_wqe_count)) { in set_user_buf_size()
1706 void *ucmd; member
1718 struct mlx5_ib_create_qp_rss *ucmd = params->ucmd; in create_rss_raw_qp_tir() local
2075 struct mlx5_ib_create_qp *ucmd = params->ucmd; in create_dci() local
2236 struct mlx5_ib_create_qp *ucmd = params->ucmd; in create_user_qp() local
2736 struct mlx5_ib_create_qp *ucmd = params->ucmd; in create_dct() local
3090 if (inlen > ucmd && !ib_is_udata_cleared(udata, ucmd, inlen - ucmd)) in process_udata_size()
3191 struct mlx5_ib_create_qp *ucmd = params->ucmd; in get_qp_uidx() local
[all …]
A Dcq.c746 if ((ucmd.cqe_size != 64 && ucmd.cqe_size != 128) || in create_cq_user()
747 ucmd.reserved0 || ucmd.reserved1) in create_cq_user()
750 *cqe_size = ucmd.cqe_size; in create_cq_user()
776 ucmd.buf_addr, entries * ucmd.cqe_size, in create_cq_user()
800 *index = ucmd.uar_page_index; in create_cq_user()
808 if (ucmd.cqe_comp_en == 1) { in create_cq_user()
1176 struct mlx5_ib_resize_cq ucmd; in resize_user() local
1180 err = ib_copy_from_udata(&ucmd, udata, sizeof(ucmd)); in resize_user()
1184 if (ucmd.reserved0 || ucmd.reserved1) in resize_user()
1188 if (ucmd.cqe_size && SIZE_MAX / ucmd.cqe_size <= entries - 1) in resize_user()
[all …]
A Dsrq.c48 struct mlx5_ib_create_srq ucmd = {}; in create_srq_user() local
55 ucmdlen = min(udata->inlen, sizeof(ucmd)); in create_srq_user()
57 if (ib_copy_from_udata(&ucmd, udata, ucmdlen)) { in create_srq_user()
62 if (ucmd.reserved0 || ucmd.reserved1) in create_srq_user()
65 if (udata->inlen > sizeof(ucmd) && in create_srq_user()
66 !ib_is_udata_cleared(udata, sizeof(ucmd), in create_srq_user()
67 udata->inlen - sizeof(ucmd))) in create_srq_user()
71 err = get_srq_user_index(ucontext, &ucmd, udata->inlen, &uidx); in create_srq_user()
76 srq->wq_sig = !!(ucmd.flags & MLX5_SRQ_FLAG_SIGNATURE); in create_srq_user()
78 srq->umem = ib_umem_get(pd->device, ucmd.buf_addr, buf_size, 0); in create_srq_user()
[all …]
/drivers/infiniband/hw/hns/
A Dhns_roce_cq.c299 struct hns_roce_ib_create_cq *ucmd) in get_cq_ucmd() argument
304 ret = ib_copy_from_udata(ucmd, udata, min(udata->inlen, sizeof(*ucmd))); in get_cq_ucmd()
314 struct hns_roce_ib_create_cq *ucmd) in set_cq_param() argument
330 struct hns_roce_ib_create_cq *ucmd) in set_cqe_size() argument
340 if (ucmd->cqe_size != HNS_ROCE_V2_CQE_SIZE && in set_cqe_size()
341 ucmd->cqe_size != HNS_ROCE_V3_CQE_SIZE) { in set_cqe_size()
343 "invalid cqe size %u.\n", ucmd->cqe_size); in set_cqe_size()
347 hr_cq->cqe_size = ucmd->cqe_size; in set_cqe_size()
363 struct hns_roce_ib_create_cq ucmd = {}; in hns_roce_create_cq() local
376 ret = get_cq_ucmd(hr_cq, udata, &ucmd); in hns_roce_create_cq()
[all …]
A Dhns_roce_srq.c346 struct hns_roce_ib_create_srq ucmd = {}; in alloc_srq_buf() local
350 ret = ib_copy_from_udata(&ucmd, udata, in alloc_srq_buf()
351 min(udata->inlen, sizeof(ucmd))); in alloc_srq_buf()
360 ret = alloc_srq_idx(hr_dev, srq, udata, ucmd.que_addr); in alloc_srq_buf()
364 ret = alloc_srq_wqe_buf(hr_dev, srq, udata, ucmd.buf_addr); in alloc_srq_buf()
392 struct hns_roce_ib_create_srq *ucmd) in get_srq_ucmd() argument
397 ret = ib_copy_from_udata(ucmd, udata, min(udata->inlen, sizeof(*ucmd))); in get_srq_ucmd()
429 struct hns_roce_ib_create_srq ucmd = {}; in alloc_srq_db() local
434 ret = get_srq_ucmd(srq, udata, &ucmd); in alloc_srq_db()
439 (ucmd.req_cap_flags & HNS_ROCE_SRQ_CAP_RECORD_DB)) { in alloc_srq_db()
[all …]
A Dhns_roce_qp.c621 struct hns_roce_ib_create_qp *ucmd) in check_sq_size_with_integrity() argument
644 struct hns_roce_ib_create_qp *ucmd) in set_user_sq_size() argument
810 struct hns_roce_ib_create_qp *ucmd) in user_qp_has_sdb() argument
868 struct hns_roce_ib_create_qp *ucmd, in alloc_user_qp_db() argument
1046 struct hns_roce_ib_create_qp *ucmd) in set_congest_type() argument
1050 switch (ucmd->cong_type_flags) { in set_congest_type()
1082 return set_congest_type(hr_qp, ucmd); in set_congest_param()
1092 struct hns_roce_ib_create_qp *ucmd) in set_qp_param() argument
1112 ret = ib_copy_from_udata(ucmd, udata, in set_qp_param()
1113 min(udata->inlen, sizeof(*ucmd))); in set_qp_param()
[all …]
/drivers/infiniband/hw/mlx4/
A Dqp.c456 if (ucmd->log_sq_stride > in set_user_sq_size()
578 ucmd->rx_hash_fields_mask); in set_qp_rss()
727 sizeof(ucmd.reserved1); in _mlx4_ib_create_qp_rss()
733 if (ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen))) { in _mlx4_ib_create_qp_rss()
738 if (memchr_inv(ucmd.reserved, 0, sizeof(ucmd.reserved))) in _mlx4_ib_create_qp_rss()
741 if (ucmd.comp_mask || ucmd.reserved1) in _mlx4_ib_create_qp_rss()
1071 struct mlx4_ib_create_qp ucmd; in create_qp_common() local
4141 sizeof(ucmd.comp_mask); in mlx4_ib_create_wq()
4278 sizeof(ucmd.reserved); in mlx4_ib_modify_wq()
4287 if (ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen))) in mlx4_ib_modify_wq()
[all …]
A Dsrq.c112 struct mlx4_ib_create_srq ucmd; in mlx4_ib_create_srq() local
114 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) in mlx4_ib_create_srq()
118 ib_umem_get(ib_srq->device, ucmd.buf_addr, buf_size, 0); in mlx4_ib_create_srq()
132 err = mlx4_ib_db_map_user(udata, ucmd.db_addr, &srq->db); in mlx4_ib_create_srq()
A Dcq.c210 struct mlx4_ib_create_cq ucmd; in mlx4_ib_create_cq() local
212 if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd)) { in mlx4_ib_create_cq()
217 buf_addr = (void *)(unsigned long)ucmd.buf_addr; in mlx4_ib_create_cq()
219 ucmd.buf_addr, entries); in mlx4_ib_create_cq()
223 err = mlx4_ib_db_map_user(udata, ucmd.db_addr, &cq->db); in mlx4_ib_create_cq()
322 struct mlx4_ib_resize_cq ucmd; in mlx4_alloc_resize_umem() local
328 if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd)) in mlx4_alloc_resize_umem()
336 ucmd.buf_addr, entries); in mlx4_alloc_resize_umem()
/drivers/dma-buf/
A Ddma-heap.c125 static long dma_heap_ioctl(struct file *file, unsigned int ucmd, in dma_heap_ioctl() argument
132 int nr = _IOC_NR(ucmd); in dma_heap_ioctl()
144 out_size = _IOC_SIZE(ucmd); in dma_heap_ioctl()
146 if ((ucmd & kcmd & IOC_IN) == 0) in dma_heap_ioctl()
148 if ((ucmd & kcmd & IOC_OUT) == 0) in dma_heap_ioctl()
/drivers/infiniband/hw/vmw_pvrdma/
A Dpvrdma_srq.c109 struct pvrdma_create_srq ucmd; in pvrdma_create_srq() local
144 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) { in pvrdma_create_srq()
149 srq->umem = ib_umem_get(ibsrq->device, ucmd.buf_addr, ucmd.buf_size, 0); in pvrdma_create_srq()
A Dpvrdma_cq.c117 struct pvrdma_create_cq ucmd; in pvrdma_create_cq() local
137 if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) { in pvrdma_create_cq()
142 cq->umem = ib_umem_get(ibdev, ucmd.buf_addr, ucmd.buf_size, in pvrdma_create_cq()

Completed in 83 milliseconds

12