[PATCH 02/12] RDMA/mlx5: add DMA-buf user fence support
Christian König
ckoenig.leichtzumerken at gmail.com
Tue May 4 13:27:19 UTC 2021
Just add the call before taking locks.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/infiniband/hw/mlx5/odp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index b103555b1f5d..6b4d980c02e8 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -804,6 +804,10 @@ static int pagefault_dmabuf_mr(struct mlx5_ib_mr *mr, size_t bcnt,
if (flags & MLX5_PF_FLAGS_ENABLE)
xlt_flags |= MLX5_IB_UPD_XLT_ENABLE;
+ err = dma_resv_sync_user_fence(umem_dmabuf->attach->dmabuf->resv);
+ if (err)
+ return err;
+
dma_resv_lock(umem_dmabuf->attach->dmabuf->resv, NULL);
err = ib_umem_dmabuf_map_pages(umem_dmabuf);
if (err) {
--
2.25.1
More information about the dri-devel
mailing list