path: root/drivers/infiniband/hw/nes
diff options
authorJason Gunthorpe <jgg@mellanox.com>2019-05-20 09:05:25 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-21 15:23:24 -0300
commitd2183c6f1958e6b6dfdde279f4cee04280710e34 (patch)
treec7e1d369b4747816879c5cc694049c791555250f /drivers/infiniband/hw/nes
parentRDMA/qedr: Fix incorrect device rate. (diff)
RDMA/umem: Move page_shift from ib_umem to ib_odp_umem
This value has always been set to PAGE_SHIFT in the core code, the only thing that does differently was the ODP path. Move the value into the ODP struct and still use it for ODP, but change all the non-ODP things to just use PAGE_SHIFT/PAGE_SIZE/PAGE_MASK directly. Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 49024326a518..ad2b8322cc3f 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -2112,10 +2112,11 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
return (struct ib_mr *)region;
- nes_debug(NES_DBG_MR, "User base = 0x%lX, Virt base = 0x%lX, length = %u,"
- " offset = %u, page size = %lu.\n",
- (unsigned long int)start, (unsigned long int)virt, (u32)length,
- ib_umem_offset(region), BIT(region->page_shift));
+ nes_debug(
+ "User base = 0x%lX, Virt base = 0x%lX, length = %u, offset = %u, page size = %lu.\n",
+ (unsigned long)start, (unsigned long)virt, (u32)length,
+ ib_umem_offset(region), PAGE_SIZE);
skip_pages = ((u32)ib_umem_offset(region)) >> 12;