diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_profile.c')
| -rw-r--r-- | drivers/infiniband/hw/mthca/mthca_profile.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c index 08a909371b0a..58d44aa3c302 100644 --- a/drivers/infiniband/hw/mthca/mthca_profile.c +++ b/drivers/infiniband/hw/mthca/mthca_profile.c | |||
| @@ -152,7 +152,7 @@ u64 mthca_make_profile(struct mthca_dev *dev, | |||
| 152 | } | 152 | } |
| 153 | if (total_size > mem_avail) { | 153 | if (total_size > mem_avail) { |
| 154 | mthca_err(dev, "Profile requires 0x%llx bytes; " | 154 | mthca_err(dev, "Profile requires 0x%llx bytes; " |
| 155 | "won't in 0x%llx bytes of context memory.\n", | 155 | "won't fit in 0x%llx bytes of context memory.\n", |
| 156 | (unsigned long long) total_size, | 156 | (unsigned long long) total_size, |
| 157 | (unsigned long long) mem_avail); | 157 | (unsigned long long) mem_avail); |
| 158 | kfree(profile); | 158 | kfree(profile); |
| @@ -262,6 +262,14 @@ u64 mthca_make_profile(struct mthca_dev *dev, | |||
| 262 | */ | 262 | */ |
| 263 | dev->limits.num_pds = MTHCA_NUM_PDS; | 263 | dev->limits.num_pds = MTHCA_NUM_PDS; |
| 264 | 264 | ||
| 265 | if (dev->mthca_flags & MTHCA_FLAG_SINAI_OPT && | ||
| 266 | init_hca->log_mpt_sz > 23) { | ||
| 267 | mthca_warn(dev, "MPT table too large (requested size 2^%d >= 2^24)\n", | ||
| 268 | init_hca->log_mpt_sz); | ||
| 269 | mthca_warn(dev, "Disabling memory key throughput optimization.\n"); | ||
| 270 | dev->mthca_flags &= ~MTHCA_FLAG_SINAI_OPT; | ||
| 271 | } | ||
| 272 | |||
| 265 | /* | 273 | /* |
| 266 | * For Tavor, FMRs use ioremapped PCI memory. For 32 bit | 274 | * For Tavor, FMRs use ioremapped PCI memory. For 32 bit |
| 267 | * systems it may use too much vmalloc space to map all MTT | 275 | * systems it may use too much vmalloc space to map all MTT |
