aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_dev.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
index 1faaf542a4e..cca3ca7196a 100644
--- a/drivers/infiniband/hw/mthca/mthca_dev.h
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h
@@ -61,7 +61,8 @@ enum {
61 MTHCA_FLAG_SRQ = 1 << 2, 61 MTHCA_FLAG_SRQ = 1 << 2,
62 MTHCA_FLAG_MSI = 1 << 3, 62 MTHCA_FLAG_MSI = 1 << 3,
63 MTHCA_FLAG_MSI_X = 1 << 4, 63 MTHCA_FLAG_MSI_X = 1 << 4,
64 MTHCA_FLAG_NO_LAM = 1 << 5 64 MTHCA_FLAG_NO_LAM = 1 << 5,
65 MTHCA_FLAG_FMR = 1 << 6
65}; 66};
66 67
67enum { 68enum {
@@ -134,6 +135,7 @@ struct mthca_limits {
134 int reserved_eqs; 135 int reserved_eqs;
135 int num_mpts; 136 int num_mpts;
136 int num_mtt_segs; 137 int num_mtt_segs;
138 int fmr_reserved_mtts;
137 int reserved_mtts; 139 int reserved_mtts;
138 int reserved_mrws; 140 int reserved_mrws;
139 int reserved_uars; 141 int reserved_uars;
@@ -178,10 +180,17 @@ struct mthca_buddy {
178 180
179struct mthca_mr_table { 181struct mthca_mr_table {
180 struct mthca_alloc mpt_alloc; 182 struct mthca_alloc mpt_alloc;
181 struct mthca_buddy mtt_buddy; 183 struct mthca_buddy mtt_buddy;
184 struct mthca_buddy *fmr_mtt_buddy;
182 u64 mtt_base; 185 u64 mtt_base;
186 u64 mpt_base;
183 struct mthca_icm_table *mtt_table; 187 struct mthca_icm_table *mtt_table;
184 struct mthca_icm_table *mpt_table; 188 struct mthca_icm_table *mpt_table;
189 struct {
190 void __iomem *mpt_base;
191 void __iomem *mtt_base;
192 struct mthca_buddy mtt_buddy;
193 } tavor_fmr;
185}; 194};
186 195
187struct mthca_eq_table { 196struct mthca_eq_table {
@@ -380,7 +389,17 @@ int mthca_mr_alloc_phys(struct mthca_dev *dev, u32 pd,
380 u64 *buffer_list, int buffer_size_shift, 389 u64 *buffer_list, int buffer_size_shift,
381 int list_len, u64 iova, u64 total_size, 390 int list_len, u64 iova, u64 total_size,
382 u32 access, struct mthca_mr *mr); 391 u32 access, struct mthca_mr *mr);
383void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr); 392void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr);
393
394int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
395 u32 access, struct mthca_fmr *fmr);
396int mthca_tavor_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list,
397 int list_len, u64 iova);
398void mthca_tavor_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr);
399int mthca_arbel_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list,
400 int list_len, u64 iova);
401void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr);
402int mthca_free_fmr(struct mthca_dev *dev, struct mthca_fmr *fmr);
384 403
385int mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt); 404int mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt);
386void mthca_unmap_eq_icm(struct mthca_dev *dev); 405void mthca_unmap_eq_icm(struct mthca_dev *dev);