RDMA/umem: Allow pinned dmabuf umem usage
authorGal Pressman <galpress@amazon.com>
Tue, 12 Oct 2021 12:09:02 +0000 (15:09 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 28 Oct 2021 11:58:26 +0000 (08:58 -0300)
commit1e4df4a21c5ac722df1099eee30cad9246c889b5
treef0b3af65c7ea5416f698aca4b7d827cbd14bd267
parent5460601de590158b37619f8e18b678aa18da6345
RDMA/umem: Allow pinned dmabuf umem usage

Introduce ib_umem_dmabuf_get_pinned() which allows the driver to get a
dmabuf umem which is pinned and does not require move_notify callback
implementation.

The returned umem is pinned and DMA mapped like standard cpu umems, and is
released through ib_umem_release() (incl. unpinning and unmapping).

Link: https://lore.kernel.org/r/20211012120903.96933-3-galpress@amazon.com
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/umem_dmabuf.c
include/rdma/ib_umem.h