From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Steve Wise" Subject: RE: [PATCH rdma-next 01/10] IB: Replace ib_umem page_size by page_shift Date: Wed, 5 Apr 2017 10:30:11 -0500 Message-ID: <0c8601d2ae21$8441bc20$8cc53460$@opengridcomputing.com> References: <20170403100640.3332-1-leon@kernel.org> <20170403100640.3332-2-leon@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170403100640.3332-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Content-Language: en-us Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: 'Leon Romanovsky' , 'Doug Ledford' Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, 'Artemy Kovalyov' , 'Selvin Xavier' , 'Steve Wise' , 'Lijun Ou' , 'Shiraz Saleem' , 'Adit Ranadive' , 'Dennis Dalessandro' , 'Ram Amrani' List-Id: linux-rdma@vger.kernel.org > From: Artemy Kovalyov > > Size of pages are held by struct ib_umem in page_size field. > > It is better to store it as an exponent, because page size by nature > is always power-of-two and used as a factor, divisor or ilog2's argument. > > The conversion of page_size to be page_shift allows to have portable > code and avoid following error while compiling on ARM: > > ERROR: "__aeabi_uldivmod" [drivers/infiniband/core/ib_core.ko] > undefined! > > CC: Selvin Xavier > CC: Steve Wise > CC: Lijun Ou > CC: Shiraz Saleem > CC: Adit Ranadive > CC: Dennis Dalessandro > CC: Ram Amrani > Signed-off-by: Artemy Kovalyov > Signed-off-by: Leon Romanovsky > --- > drivers/infiniband/core/umem.c | 15 ++++++--------- > drivers/infiniband/core/umem_odp.c | 12 ++++++------ > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 ++++++------ > drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 ++-- > drivers/infiniband/hw/cxgb4/mem.c | 4 ++-- For the cxgb parts: Acked-by: Steve Wise -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html