[PATCH v5 12/24] IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP

Jason Gunthorpe jgg at ziepe.ca
Sat Nov 16 01:09:27 AEDT 2019


On Thu, Nov 14, 2019 at 09:53:28PM -0800, John Hubbard wrote:
> Convert infiniband to use the new pin_user_pages*() calls.
> 
> Also, revert earlier changes to Infiniband ODP that had it using
> put_user_page(). ODP is "Case 3" in
> Documentation/core-api/pin_user_pages.rst, which is to say, normal
> get_user_pages() and put_page() is the API to use there.
> 
> The new pin_user_pages*() calls replace corresponding get_user_pages*()
> calls, and set the FOLL_PIN flag. The FOLL_PIN flag requires that the
> caller must return the pages via put_user_page*() calls, but infiniband
> was already doing that as part of an earlier commit.
> 
> Signed-off-by: John Hubbard <jhubbard at nvidia.com>
> ---
>  drivers/infiniband/core/umem.c              |  2 +-
>  drivers/infiniband/core/umem_odp.c          | 13 ++++++-------
>  drivers/infiniband/hw/hfi1/user_pages.c     |  2 +-
>  drivers/infiniband/hw/mthca/mthca_memfree.c |  2 +-
>  drivers/infiniband/hw/qib/qib_user_pages.c  |  2 +-
>  drivers/infiniband/hw/qib/qib_user_sdma.c   |  2 +-
>  drivers/infiniband/hw/usnic/usnic_uiom.c    |  2 +-
>  drivers/infiniband/sw/siw/siw_mem.c         |  2 +-
>  8 files changed, 13 insertions(+), 14 deletions(-)

Ok

Reviewed-by: Jason Gunthorpe <jgg at mellanox.com>

Jason


More information about the Linuxppc-dev mailing list