diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 90d4334179bf..c7bff3ee9ab9 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #ifdef CONFIG_PPC_64K_PAGES | 43 | #ifdef CONFIG_PPC_64K_PAGES |
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #endif | 45 | #endif |
46 | |||
46 | #include "ehca_classes.h" | 47 | #include "ehca_classes.h" |
47 | #include "ehca_iverbs.h" | 48 | #include "ehca_iverbs.h" |
48 | #include "ehca_mrmw.h" | 49 | #include "ehca_mrmw.h" |
@@ -66,6 +67,7 @@ int ehca_poll_all_eqs = 1; | |||
66 | int ehca_static_rate = -1; | 67 | int ehca_static_rate = -1; |
67 | int ehca_scaling_code = 0; | 68 | int ehca_scaling_code = 0; |
68 | int ehca_mr_largepage = 1; | 69 | int ehca_mr_largepage = 1; |
70 | int ehca_lock_hcalls = -1; | ||
69 | 71 | ||
70 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); | 72 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); |
71 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); | 73 | module_param_named(debug_level, ehca_debug_level, int, S_IRUGO); |
@@ -77,6 +79,7 @@ module_param_named(poll_all_eqs, ehca_poll_all_eqs, int, S_IRUGO); | |||
77 | module_param_named(static_rate, ehca_static_rate, int, S_IRUGO); | 79 | module_param_named(static_rate, ehca_static_rate, int, S_IRUGO); |
78 | module_param_named(scaling_code, ehca_scaling_code, int, S_IRUGO); | 80 | module_param_named(scaling_code, ehca_scaling_code, int, S_IRUGO); |
79 | module_param_named(mr_largepage, ehca_mr_largepage, int, S_IRUGO); | 81 | module_param_named(mr_largepage, ehca_mr_largepage, int, S_IRUGO); |
82 | module_param_named(lock_hcalls, ehca_lock_hcalls, bool, S_IRUGO); | ||
80 | 83 | ||
81 | MODULE_PARM_DESC(open_aqp1, | 84 | MODULE_PARM_DESC(open_aqp1, |
82 | "AQP1 on startup (0: no (default), 1: yes)"); | 85 | "AQP1 on startup (0: no (default), 1: yes)"); |
@@ -102,6 +105,9 @@ MODULE_PARM_DESC(scaling_code, | |||
102 | MODULE_PARM_DESC(mr_largepage, | 105 | MODULE_PARM_DESC(mr_largepage, |
103 | "use large page for MR (0: use PAGE_SIZE (default), " | 106 | "use large page for MR (0: use PAGE_SIZE (default), " |
104 | "1: use large page depending on MR size"); | 107 | "1: use large page depending on MR size"); |
108 | MODULE_PARM_DESC(lock_hcalls, | ||
109 | "serialize all hCalls made by the driver " | ||
110 | "(default: autodetect)"); | ||
105 | 111 | ||
106 | DEFINE_RWLOCK(ehca_qp_idr_lock); | 112 | DEFINE_RWLOCK(ehca_qp_idr_lock); |
107 | DEFINE_RWLOCK(ehca_cq_idr_lock); | 113 | DEFINE_RWLOCK(ehca_cq_idr_lock); |
@@ -258,6 +264,7 @@ static struct cap_descr { | |||
258 | { HCA_CAP_UD_LL_QP, "HCA_CAP_UD_LL_QP" }, | 264 | { HCA_CAP_UD_LL_QP, "HCA_CAP_UD_LL_QP" }, |
259 | { HCA_CAP_RESIZE_MR, "HCA_CAP_RESIZE_MR" }, | 265 | { HCA_CAP_RESIZE_MR, "HCA_CAP_RESIZE_MR" }, |
260 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, | 266 | { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" }, |
267 | { HCA_CAP_H_ALLOC_RES_SYNC, "HCA_CAP_H_ALLOC_RES_SYNC" }, | ||
261 | }; | 268 | }; |
262 | 269 | ||
263 | static int ehca_sense_attributes(struct ehca_shca *shca) | 270 | static int ehca_sense_attributes(struct ehca_shca *shca) |
@@ -333,6 +340,12 @@ static int ehca_sense_attributes(struct ehca_shca *shca) | |||
333 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) | 340 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) |
334 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); | 341 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); |
335 | 342 | ||
343 | /* Autodetect hCall locking -- the "H_ALLOC_RESOURCE synced" flag is | ||
344 | * a firmware property, so it's valid across all adapters | ||
345 | */ | ||
346 | if (ehca_lock_hcalls == -1) | ||
347 | ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC); | ||
348 | |||
336 | /* translate supported MR page sizes; always support 4K */ | 349 | /* translate supported MR page sizes; always support 4K */ |
337 | shca->hca_cap_mr_pgsize = EHCA_PAGESIZE; | 350 | shca->hca_cap_mr_pgsize = EHCA_PAGESIZE; |
338 | if (ehca_mr_largepage) { /* support extra sizes only if enabled */ | 351 | if (ehca_mr_largepage) { /* support extra sizes only if enabled */ |