aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYishai Hadas <[email protected]>2021-03-04 13:04:59 +0000
committerJason Gunthorpe <[email protected]>2021-03-12 00:20:36 +0000
commit3f32dc0f4601b180bbfd7b5adc7f82557f1408d0 (patch)
treecaa8b30ce733c5a08a5a894f5ee6ce4092627622
parentRDMA/mlx5: Fix mlx5 rates to IB rates map (diff)
downloadkernel-3f32dc0f4601b180bbfd7b5adc7f82557f1408d0.tar.gz
kernel-3f32dc0f4601b180bbfd7b5adc7f82557f1408d0.zip
IB/core: Drop WARN_ON() from ib_umem_find_best_pgsz()
The WARN_ON() issued as part of ib_umem_find_best_pgsz() blocked cases when only page sizes larger than PAGE_SIZE were set, drop it to enable those cases. In addition, there is no need to have a specific check for zero pgsz_bitmap, the function will do its job and return 0 at the end if nothing match will be found. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Yishai Hadas <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/core/umem.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 2dde99a9ba07..2cd64649005b 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -100,10 +100,6 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
*/
pgsz_bitmap &= GENMASK(BITS_PER_LONG - 1, PAGE_SHIFT);
- /* At minimum, drivers must support PAGE_SIZE or smaller */
- if (WARN_ON(!(pgsz_bitmap & GENMASK(PAGE_SHIFT, 0))))
- return 0;
-
umem->iova = va = virt;
/* The best result is the smallest page size that results in the minimum
* number of required pages. Compute the largest page size that could