diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2015-07-21 08:36:07 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-10-13 03:46:07 +0100 |
commit | cb463364d46787ddf6209db1b5c50386db221ba7 (patch) | |
tree | 72fffe59569825edc26b72941dba8bf3a79b629b /drivers/infiniband/hw/qib/qib_verbs.h | |
parent | ff8c37e67a9b4a8e8442c601fc2a557f58d99c2c (diff) | |
download | kernel_samsung_smdk4412-cb463364d46787ddf6209db1b5c50386db221ba7.zip kernel_samsung_smdk4412-cb463364d46787ddf6209db1b5c50386db221ba7.tar.gz kernel_samsung_smdk4412-cb463364d46787ddf6209db1b5c50386db221ba7.tar.bz2 |
IB/qib: Change lkey table allocation to support more MRs
commit d6f1c17e162b2a11e708f28fa93f2f79c164b442 upstream.
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
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>
[bwh: Backported to 3.2:
- Adjust context
- Add definition of qib_dev_warn(), added upstream by commit ddb887658970
("IB/qib: Convert opcode counters to per-context")]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_verbs.h')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_verbs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qib/qib_verbs.h b/drivers/infiniband/hw/qib/qib_verbs.h index 0c19ef0..66f7f62 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.h +++ b/drivers/infiniband/hw/qib/qib_verbs.h @@ -622,6 +622,8 @@ struct qib_qpn_table { struct qpn_map map[QPNMAP_ENTRIES]; }; +#define MAX_LKEY_TABLE_BITS 23 + struct qib_lkey_table { spinlock_t lock; /* protect changes in this struct */ u32 next; /* next unused index (speeds search) */ |