IB/qib: Change lkey table allocation to support more MRs
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Tue, 21 Jul 2015 12:36:07 +0000 (08:36 -0400)
committerDoug Ledford <dledford@redhat.com>
Sat, 29 Aug 2015 02:54:46 +0000 (22:54 -0400)
commitd6f1c17e162b2a11e708f28fa93f2f79c164b442
treeaa1a64585e9a27ae91aeb8ae229ac4636162d297
parente0238a6a369eaa2e41b2c0321453272fb859f618
IB/qib: Change lkey table allocation to support more MRs

The lkey table is allocated with with a get_user_pages() with an
order based on a number of index bits from a module parameter.

The underlying kernel code cannot allocate that many contiguous pages.

There is no reason the underlying memory needs to be physically
contiguous.

This patch:
- switches the allocation/deallocation to vmalloc/vfree
- caps the number of bits to 23 to insure at least 1 generation bit
  o this matches the module parameter description

Cc: stable@vger.kernel.org
Reviewed-by: Vinit Agnihotri <vinit.abhay.agnihotri@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib_keys.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h