aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_classes.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_classes.h')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_classes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
index 043e4fb23fb0..63b8b9f7c4fc 100644
--- a/drivers/infiniband/hw/ehca/ehca_classes.h
+++ b/drivers/infiniband/hw/ehca/ehca_classes.h
@@ -100,6 +100,11 @@ struct ehca_sport {
100 struct ehca_sma_attr saved_attr; 100 struct ehca_sma_attr saved_attr;
101}; 101};
102 102
103#define HCA_CAP_MR_PGSIZE_4K 1
104#define HCA_CAP_MR_PGSIZE_64K 2
105#define HCA_CAP_MR_PGSIZE_1M 4
106#define HCA_CAP_MR_PGSIZE_16M 8
107
103struct ehca_shca { 108struct ehca_shca {
104 struct ib_device ib_device; 109 struct ib_device ib_device;
105 struct ibmebus_dev *ibmebus_dev; 110 struct ibmebus_dev *ibmebus_dev;
@@ -115,6 +120,8 @@ struct ehca_shca {
115 struct h_galpas galpas; 120 struct h_galpas galpas;
116 struct mutex modify_mutex; 121 struct mutex modify_mutex;
117 u64 hca_cap; 122 u64 hca_cap;
123 /* MR pgsize: bit 0-3 means 4K, 64K, 1M, 16M respectively */
124 u32 hca_cap_mr_pgsize;
118 int max_mtu; 125 int max_mtu;
119}; 126};
120 127
@@ -206,6 +213,7 @@ struct ehca_mr {
206 enum ehca_mr_flag flags; 213 enum ehca_mr_flag flags;
207 u32 num_kpages; /* number of kernel pages */ 214 u32 num_kpages; /* number of kernel pages */
208 u32 num_hwpages; /* number of hw pages to form MR */ 215 u32 num_hwpages; /* number of hw pages to form MR */
216 u64 hwpage_size; /* hw page size used for this MR */
209 int acl; /* ACL (stored here for usage in reregister) */ 217 int acl; /* ACL (stored here for usage in reregister) */
210 u64 *start; /* virtual start address (stored here for */ 218 u64 *start; /* virtual start address (stored here for */
211 /* usage in reregister) */ 219 /* usage in reregister) */
@@ -240,6 +248,7 @@ struct ehca_mr_pginfo {
240 enum ehca_mr_pgi_type type; 248 enum ehca_mr_pgi_type type;
241 u64 num_kpages; 249 u64 num_kpages;
242 u64 kpage_cnt; 250 u64 kpage_cnt;
251 u64 hwpage_size; /* hw page size used for this MR */
243 u64 num_hwpages; /* number of hw pages */ 252 u64 num_hwpages; /* number of hw pages */
244 u64 hwpage_cnt; /* counter for hw pages */ 253 u64 hwpage_cnt; /* counter for hw pages */
245 u64 next_hwpage; /* next hw page in buffer/chunk/listelem */ 254 u64 next_hwpage; /* next hw page in buffer/chunk/listelem */