diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-26 15:23:10 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-11-02 14:53:54 -0400 |
commit | aab8d3966d2c2aa6c59fbacdb17d82156653754f (patch) | |
tree | 40f7bab5207c0de9fe0ac913de9f32fbb33fff5d /drivers/infiniband/hw/mlx5/devx.c | |
parent | f8fb3110635c91a375399450dc5a4a79a83b0414 (diff) | |
download | lwn-aab8d3966d2c2aa6c59fbacdb17d82156653754f.tar.gz lwn-aab8d3966d2c2aa6c59fbacdb17d82156653754f.zip |
RDMA/mlx5: Change mlx5_ib_populate_pas() to use rdma_for_each_block()
This routine converts the umem SGL into a list of fixed pages for DMA,
which is exactly what rdma_umem_for_each_dma_block() is for, use the
common code directly.
Link: https://lore.kernel.org/r/20201026132314.1336717-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/devx.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/devx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c index ae889266acf1..611ce21157de 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -2115,9 +2115,9 @@ static void devx_umem_reg_cmd_build(struct mlx5_ib_dev *dev, MLX5_SET(umem, umem, log_page_size, obj->page_shift - MLX5_ADAPTER_PAGE_SHIFT); MLX5_SET(umem, umem, page_offset, obj->page_offset); - mlx5_ib_populate_pas(dev, obj->umem, obj->page_shift, mtt, + mlx5_ib_populate_pas(obj->umem, 1UL << obj->page_shift, mtt, (obj->umem->writable ? MLX5_IB_MTT_WRITE : 0) | - MLX5_IB_MTT_READ); + MLX5_IB_MTT_READ); } static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_UMEM_REG)( |