diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 04c324330b7c..ec0145192228 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -63,6 +63,7 @@ int ehca_port_act_time = 30; | |||
63 | int ehca_poll_all_eqs = 1; | 63 | int ehca_poll_all_eqs = 1; |
64 | int ehca_static_rate = -1; | 64 | int ehca_static_rate = -1; |
65 | int ehca_scaling_code = 0; | 65 | int ehca_scaling_code = 0; |
66 | int ehca_mr_largepage = 0; | ||
66 | 67 | ||
67 | module_param_named(open_aqp1, ehca_open_aqp1, int, 0); | 68 | module_param_named(open_aqp1, ehca_open_aqp1, int, 0); |
68 | module_param_named(debug_level, ehca_debug_level, int, 0); | 69 | module_param_named(debug_level, ehca_debug_level, int, 0); |
@@ -72,7 +73,8 @@ module_param_named(use_hp_mr, ehca_use_hp_mr, int, 0); | |||
72 | module_param_named(port_act_time, ehca_port_act_time, int, 0); | 73 | module_param_named(port_act_time, ehca_port_act_time, int, 0); |
73 | module_param_named(poll_all_eqs, ehca_poll_all_eqs, int, 0); | 74 | module_param_named(poll_all_eqs, ehca_poll_all_eqs, int, 0); |
74 | module_param_named(static_rate, ehca_static_rate, int, 0); | 75 | module_param_named(static_rate, ehca_static_rate, int, 0); |
75 | module_param_named(scaling_code, ehca_scaling_code, int, 0); | 76 | module_param_named(scaling_code, ehca_scaling_code, int, 0); |
77 | module_param_named(mr_largepage, ehca_mr_largepage, int, 0); | ||
76 | 78 | ||
77 | MODULE_PARM_DESC(open_aqp1, | 79 | MODULE_PARM_DESC(open_aqp1, |
78 | "AQP1 on startup (0: no (default), 1: yes)"); | 80 | "AQP1 on startup (0: no (default), 1: yes)"); |
@@ -95,6 +97,9 @@ MODULE_PARM_DESC(static_rate, | |||
95 | "set permanent static rate (default: disabled)"); | 97 | "set permanent static rate (default: disabled)"); |
96 | MODULE_PARM_DESC(scaling_code, | 98 | MODULE_PARM_DESC(scaling_code, |
97 | "set scaling code (0: disabled/default, 1: enabled)"); | 99 | "set scaling code (0: disabled/default, 1: enabled)"); |
100 | MODULE_PARM_DESC(mr_largepage, | ||
101 | "use large page for MR (0: use PAGE_SIZE (default), " | ||
102 | "1: use large page depending on MR size"); | ||
98 | 103 | ||
99 | DEFINE_RWLOCK(ehca_qp_idr_lock); | 104 | DEFINE_RWLOCK(ehca_qp_idr_lock); |
100 | DEFINE_RWLOCK(ehca_cq_idr_lock); | 105 | DEFINE_RWLOCK(ehca_cq_idr_lock); |
@@ -295,6 +300,8 @@ int ehca_sense_attributes(struct ehca_shca *shca) | |||
295 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) | 300 | if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap)) |
296 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); | 301 | ehca_gen_dbg(" %s", hca_cap_descr[i].descr); |
297 | 302 | ||
303 | shca->hca_cap_mr_pgsize = rblock->memory_page_size_supported; | ||
304 | |||
298 | port = (struct hipz_query_port *)rblock; | 305 | port = (struct hipz_query_port *)rblock; |
299 | h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port); | 306 | h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port); |
300 | if (h_ret != H_SUCCESS) { | 307 | if (h_ret != H_SUCCESS) { |
@@ -590,6 +597,14 @@ static ssize_t ehca_show_adapter_handle(struct device *dev, | |||
590 | } | 597 | } |
591 | static DEVICE_ATTR(adapter_handle, S_IRUGO, ehca_show_adapter_handle, NULL); | 598 | static DEVICE_ATTR(adapter_handle, S_IRUGO, ehca_show_adapter_handle, NULL); |
592 | 599 | ||
600 | static ssize_t ehca_show_mr_largepage(struct device *dev, | ||
601 | struct device_attribute *attr, | ||
602 | char *buf) | ||
603 | { | ||
604 | return sprintf(buf, "%d\n", ehca_mr_largepage); | ||
605 | } | ||
606 | static DEVICE_ATTR(mr_largepage, S_IRUGO, ehca_show_mr_largepage, NULL); | ||
607 | |||
593 | static struct attribute *ehca_dev_attrs[] = { | 608 | static struct attribute *ehca_dev_attrs[] = { |
594 | &dev_attr_adapter_handle.attr, | 609 | &dev_attr_adapter_handle.attr, |
595 | &dev_attr_num_ports.attr, | 610 | &dev_attr_num_ports.attr, |
@@ -606,6 +621,7 @@ static struct attribute *ehca_dev_attrs[] = { | |||
606 | &dev_attr_cur_mw.attr, | 621 | &dev_attr_cur_mw.attr, |
607 | &dev_attr_max_pd.attr, | 622 | &dev_attr_max_pd.attr, |
608 | &dev_attr_max_ah.attr, | 623 | &dev_attr_max_ah.attr, |
624 | &dev_attr_mr_largepage.attr, | ||
609 | NULL | 625 | NULL |
610 | }; | 626 | }; |
611 | 627 | ||