OSDN Git Service

RDMA/mthca: Use for_each_sg_dma_page iterator on umem SGL
authorShiraz, Saleem <shiraz.saleem@intel.com>
Mon, 11 Feb 2019 15:24:58 +0000 (09:24 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 11 Feb 2019 22:02:33 +0000 (15:02 -0700)
commit8d249af3e6d70db08b61449fe6ad1da000d625d1
treedb49b0f8c80ac9e0a0ca66a0cf996847c4362fc6
parent161ebe2498d4108c5e80dc3b47736ecda32cd816
RDMA/mthca: Use for_each_sg_dma_page iterator on umem SGL

Use the for_each_sg_dma_page iterator variant to walk the umem DMA-mapped
SGL and get the page DMA address. This avoids the extra loop to iterate
pages in the SGE when for_each_sg iterator is used.

Additionally, purge umem->page_shift usage in the driver as its only
relevant for ODP MRs. Use system page size and shift instead.

Signed-off-by: Shiraz, Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mthca/mthca_provider.c