RDMA/mlx5: Remove unused parameter udata
The old version of ib_umem_get() need these udata as a parameter but now
they are unnecessary.
Fixes: c320e527e1
("IB: Allow calls to ib_umem_get from kernel ULPs")
Link: https://lore.kernel.org/r/1620807142-39157-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
aca496fb61
commit
0bedd3d005
|
@ -750,7 +750,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
|
||||||
goto err_umem;
|
goto err_umem;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = mlx5_ib_db_map_user(context, udata, ucmd.db_addr, &cq->db);
|
err = mlx5_ib_db_map_user(context, ucmd.db_addr, &cq->db);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_umem;
|
goto err_umem;
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,7 @@ struct mlx5_ib_user_db_page {
|
||||||
int refcnt;
|
int refcnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context,
|
int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context, unsigned long virt,
|
||||||
struct ib_udata *udata, unsigned long virt,
|
|
||||||
struct mlx5_db *db)
|
struct mlx5_db *db)
|
||||||
{
|
{
|
||||||
struct mlx5_ib_user_db_page *page;
|
struct mlx5_ib_user_db_page *page;
|
||||||
|
|
|
@ -1198,8 +1198,7 @@ to_mmmap(struct rdma_user_mmap_entry *rdma_entry)
|
||||||
struct mlx5_user_mmap_entry, rdma_entry);
|
struct mlx5_user_mmap_entry, rdma_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context,
|
int mlx5_ib_db_map_user(struct mlx5_ib_ucontext *context, unsigned long virt,
|
||||||
struct ib_udata *udata, unsigned long virt,
|
|
||||||
struct mlx5_db *db);
|
struct mlx5_db *db);
|
||||||
void mlx5_ib_db_unmap_user(struct mlx5_ib_ucontext *context, struct mlx5_db *db);
|
void mlx5_ib_db_unmap_user(struct mlx5_ib_ucontext *context, struct mlx5_db *db);
|
||||||
void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
|
void __mlx5_ib_cq_clean(struct mlx5_ib_cq *cq, u32 qpn, struct mlx5_ib_srq *srq);
|
||||||
|
@ -1265,7 +1264,6 @@ int mlx5_ib_update_xlt(struct mlx5_ib_mr *mr, u64 idx, int npages,
|
||||||
int page_shift, int flags);
|
int page_shift, int flags);
|
||||||
int mlx5_ib_update_mr_pas(struct mlx5_ib_mr *mr, unsigned int flags);
|
int mlx5_ib_update_mr_pas(struct mlx5_ib_mr *mr, unsigned int flags);
|
||||||
struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
|
struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
|
||||||
struct ib_udata *udata,
|
|
||||||
int access_flags);
|
int access_flags);
|
||||||
void mlx5_ib_free_implicit_mr(struct mlx5_ib_mr *mr);
|
void mlx5_ib_free_implicit_mr(struct mlx5_ib_mr *mr);
|
||||||
void mlx5_ib_free_odp_mr(struct mlx5_ib_mr *mr);
|
void mlx5_ib_free_odp_mr(struct mlx5_ib_mr *mr);
|
||||||
|
|
|
@ -1510,7 +1510,7 @@ static struct ib_mr *create_user_odp_mr(struct ib_pd *pd, u64 start, u64 length,
|
||||||
if (!(dev->odp_caps.general_caps & IB_ODP_SUPPORT_IMPLICIT))
|
if (!(dev->odp_caps.general_caps & IB_ODP_SUPPORT_IMPLICIT))
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
mr = mlx5_ib_alloc_implicit_mr(to_mpd(pd), udata, access_flags);
|
mr = mlx5_ib_alloc_implicit_mr(to_mpd(pd), access_flags);
|
||||||
if (IS_ERR(mr))
|
if (IS_ERR(mr))
|
||||||
return ERR_CAST(mr);
|
return ERR_CAST(mr);
|
||||||
return &mr->ibmr;
|
return &mr->ibmr;
|
||||||
|
|
|
@ -478,7 +478,6 @@ out_mr:
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
|
struct mlx5_ib_mr *mlx5_ib_alloc_implicit_mr(struct mlx5_ib_pd *pd,
|
||||||
struct ib_udata *udata,
|
|
||||||
int access_flags)
|
int access_flags)
|
||||||
{
|
{
|
||||||
struct mlx5_ib_dev *dev = to_mdev(pd->ibpd.device);
|
struct mlx5_ib_dev *dev = to_mdev(pd->ibpd.device);
|
||||||
|
|
|
@ -835,7 +835,7 @@ static int create_user_rq(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
||||||
ib_umem_num_pages(rwq->umem), page_size, rwq->rq_num_pas,
|
ib_umem_num_pages(rwq->umem), page_size, rwq->rq_num_pas,
|
||||||
offset);
|
offset);
|
||||||
|
|
||||||
err = mlx5_ib_db_map_user(ucontext, udata, ucmd->db_addr, &rwq->db);
|
err = mlx5_ib_db_map_user(ucontext, ucmd->db_addr, &rwq->db);
|
||||||
if (err) {
|
if (err) {
|
||||||
mlx5_ib_dbg(dev, "map failed\n");
|
mlx5_ib_dbg(dev, "map failed\n");
|
||||||
goto err_umem;
|
goto err_umem;
|
||||||
|
@ -961,7 +961,7 @@ static int _create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
||||||
resp->bfreg_index = MLX5_IB_INVALID_BFREG;
|
resp->bfreg_index = MLX5_IB_INVALID_BFREG;
|
||||||
qp->bfregn = bfregn;
|
qp->bfregn = bfregn;
|
||||||
|
|
||||||
err = mlx5_ib_db_map_user(context, udata, ucmd->db_addr, &qp->db);
|
err = mlx5_ib_db_map_user(context, ucmd->db_addr, &qp->db);
|
||||||
if (err) {
|
if (err) {
|
||||||
mlx5_ib_dbg(dev, "map failed\n");
|
mlx5_ib_dbg(dev, "map failed\n");
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
|
|
@ -84,7 +84,7 @@ static int create_srq_user(struct ib_pd *pd, struct mlx5_ib_srq *srq,
|
||||||
}
|
}
|
||||||
in->umem = srq->umem;
|
in->umem = srq->umem;
|
||||||
|
|
||||||
err = mlx5_ib_db_map_user(ucontext, udata, ucmd.db_addr, &srq->db);
|
err = mlx5_ib_db_map_user(ucontext, ucmd.db_addr, &srq->db);
|
||||||
if (err) {
|
if (err) {
|
||||||
mlx5_ib_dbg(dev, "map doorbell failed\n");
|
mlx5_ib_dbg(dev, "map doorbell failed\n");
|
||||||
goto err_umem;
|
goto err_umem;
|
||||||
|
|
Loading…
Reference in New Issue