/Linux-v5.4/drivers/infiniband/hw/mthca/ |
D | mthca_mr.c | 211 struct mthca_mtt *mtt; in __mthca_alloc_mtt() local 217 mtt = kmalloc(sizeof *mtt, GFP_KERNEL); in __mthca_alloc_mtt() 218 if (!mtt) in __mthca_alloc_mtt() 221 mtt->buddy = buddy; in __mthca_alloc_mtt() 222 mtt->order = 0; in __mthca_alloc_mtt() 224 ++mtt->order; in __mthca_alloc_mtt() 226 mtt->first_seg = mthca_alloc_mtt_range(dev, mtt->order, buddy); in __mthca_alloc_mtt() 227 if (mtt->first_seg == -1) { in __mthca_alloc_mtt() 228 kfree(mtt); in __mthca_alloc_mtt() 232 return mtt; in __mthca_alloc_mtt() [all …]
|
D | mthca_provider.h | 76 struct mthca_mtt *mtt; member 82 struct mthca_mtt *mtt; member
|
D | mthca_provider.c | 893 mr->mtt = mthca_alloc_mtt(dev, n); in mthca_reg_user_mr() 894 if (IS_ERR(mr->mtt)) { in mthca_reg_user_mr() 895 err = PTR_ERR(mr->mtt); in mthca_reg_user_mr() 917 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr() 926 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr() 941 mthca_free_mtt(dev, mr->mtt); in mthca_reg_user_mr()
|
D | mthca_dev.h | 468 void mthca_free_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt); 469 int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx4/ |
D | mr.c | 195 struct mlx4_mtt *mtt) in mlx4_mtt_init() argument 200 mtt->order = -1; in mlx4_mtt_init() 201 mtt->page_shift = MLX4_ICM_PAGE_SHIFT; in mlx4_mtt_init() 204 mtt->page_shift = page_shift; in mlx4_mtt_init() 206 for (mtt->order = 0, i = 1; i < npages; i <<= 1) in mlx4_mtt_init() 207 ++mtt->order; in mlx4_mtt_init() 209 mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order); in mlx4_mtt_init() 210 if (mtt->offset == -1) in mlx4_mtt_init() 251 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt) in mlx4_mtt_cleanup() argument 253 if (mtt->order < 0) in mlx4_mtt_cleanup() [all …]
|
D | resource_tracker.c | 110 struct res_mtt *mtt; member 158 struct res_mtt *mtt; member 170 struct res_mtt *mtt; member 181 struct res_mtt *mtt; member 193 struct res_mtt *mtt; member 456 dev->quotas.mtt = dev->caps.num_mtts - dev->caps.reserved_mtts; in mlx4_init_quotas() 468 dev->quotas.mtt = in mlx4_init_quotas() 2744 int size, struct res_mtt *mtt) in check_mtt_range() argument 2746 int res_start = mtt->com.res_id; in check_mtt_range() 2747 int res_size = (1 << mtt->order); in check_mtt_range() [all …]
|
D | cq.c | 192 int entries, struct mlx4_mtt *mtt) in mlx4_cq_resize() argument 205 cq_context->log_page_size = mtt->page_shift - 12; in mlx4_cq_resize() 206 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_cq_resize() 342 struct mlx4_mtt *mtt, struct mlx4_uar *uar, u64 db_rec, in mlx4_cq_alloc() argument 384 cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in mlx4_cq_alloc() 386 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_cq_alloc()
|
D | srq.c | 163 struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq) in mlx4_srq_alloc() argument 193 srq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in mlx4_srq_alloc() 195 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_srq_alloc()
|
D | qp.c | 87 static int __mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in __mlx4_qp_modify() argument 164 u64 mtt_addr = mlx4_mtt_addr(dev, mtt); in __mlx4_qp_modify() 167 context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in __mlx4_qp_modify() 208 int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in mlx4_qp_modify() argument 214 return __mlx4_qp_modify(dev, mtt, cur_state, new_state, context, in mlx4_qp_modify() 914 int mlx4_qp_to_ready(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in mlx4_qp_to_ready() argument 932 err = mlx4_qp_modify(dev, mtt, states[i], states[i + 1], in mlx4_qp_to_ready()
|
D | alloc.c | 790 &wqres->mtt); in mlx4_alloc_hwq_res() 794 err = mlx4_buf_write_mtt(dev, &wqres->mtt, &wqres->buf); in mlx4_alloc_hwq_res() 801 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_alloc_hwq_res() 814 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_free_hwq_res()
|
D | en_cq.c | 141 err = mlx4_cq_alloc(mdev->dev, cq->size, &cq->wqres.mtt, in mlx4_en_activate_cq()
|
D | eq.c | 1028 err = mlx4_mtt_init(dev, npages, PAGE_SHIFT, &eq->mtt); in mlx4_create_eq() 1032 err = mlx4_write_mtt(dev, &eq->mtt, 0, npages, dma_list); in mlx4_create_eq() 1042 mtt_addr = mlx4_mtt_addr(dev, &eq->mtt); in mlx4_create_eq() 1066 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_create_eq() 1106 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_free_eq()
|
/Linux-v5.4/drivers/infiniband/hw/hns/ |
D | hns_roce_srq.c | 95 srq->mtt.first_seg, in hns_roce_srq_alloc() 105 srq->idx_que.mtt.first_seg, in hns_roce_srq_alloc() 198 ret = hns_roce_mtt_init(hr_dev, npages, page_shift, &srq->mtt); in create_user_srq() 202 ret = hns_roce_ib_umem_write_mtt(hr_dev, &srq->mtt, srq->umem); in create_user_srq() 216 PAGE_SHIFT, &srq->idx_que.mtt); in create_user_srq() 223 ret = hns_roce_ib_umem_write_mtt(hr_dev, &srq->idx_que.mtt, in create_user_srq() 234 hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt); in create_user_srq() 240 hns_roce_mtt_cleanup(hr_dev, &srq->mtt); in create_user_srq() 283 &srq->mtt); in create_kernel_srq() 287 ret = hns_roce_buf_write_mtt(hr_dev, &srq->mtt, &srq->buf); in create_kernel_srq() [all …]
|
D | hns_roce_mr.c | 222 struct hns_roce_mtt *mtt) in hns_roce_mtt_init() argument 229 mtt->order = -1; in hns_roce_mtt_init() 230 mtt->page_shift = HNS_ROCE_HEM_PAGE_SHIFT; in hns_roce_mtt_init() 235 mtt->page_shift = page_shift; in hns_roce_mtt_init() 238 for (mtt->order = 0, i = HNS_ROCE_MTT_ENTRY_PER_SEG; i < npages; in hns_roce_mtt_init() 240 ++mtt->order; in hns_roce_mtt_init() 243 ret = hns_roce_alloc_mtt_range(hr_dev, mtt->order, &mtt->first_seg, in hns_roce_mtt_init() 244 mtt->mtt_type); in hns_roce_mtt_init() 251 void hns_roce_mtt_cleanup(struct hns_roce_dev *hr_dev, struct hns_roce_mtt *mtt) in hns_roce_mtt_cleanup() argument 255 if (mtt->order < 0) in hns_roce_mtt_cleanup() [all …]
|
D | hns_roce_device.h | 518 struct hns_roce_mtt mtt; member 537 struct hns_roce_mtt mtt; member 665 struct hns_roce_mtt mtt; member 1135 struct hns_roce_mtt *mtt); 1137 struct hns_roce_mtt *mtt); 1139 struct hns_roce_mtt *mtt, struct hns_roce_buf *buf); 1216 struct hns_roce_mtt *mtt, struct ib_umem *umem);
|
/Linux-v5.4/drivers/infiniband/hw/mlx4/ |
D | srq.c | 118 PAGE_SHIFT, &srq->mtt); in mlx4_ib_create_srq() 122 err = mlx4_ib_umem_write_mtt(dev, &srq->mtt, srq->umem); in mlx4_ib_create_srq() 158 &srq->mtt); in mlx4_ib_create_srq() 162 err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf); in mlx4_ib_create_srq() 180 &srq->mtt, srq->db.dma, &srq->msrq); in mlx4_ib_create_srq() 204 mlx4_mtt_cleanup(dev->dev, &srq->mtt); in mlx4_ib_create_srq() 268 mlx4_mtt_cleanup(dev->dev, &msrq->mtt); in mlx4_ib_destroy_srq()
|
D | cq.c | 113 &buf->mtt); in mlx4_ib_alloc_cq_buf() 117 err = mlx4_buf_write_mtt(dev->dev, &buf->mtt, &buf->buf); in mlx4_ib_alloc_cq_buf() 124 mlx4_mtt_cleanup(dev->dev, &buf->mtt); in mlx4_ib_alloc_cq_buf() 154 err = mlx4_mtt_init(dev->dev, n, shift, &buf->mtt); in mlx4_ib_get_cq_umem() 159 err = mlx4_ib_umem_write_mtt(dev, &buf->mtt, *umem); in mlx4_ib_get_cq_umem() 166 mlx4_mtt_cleanup(dev->dev, &buf->mtt); in mlx4_ib_get_cq_umem() 248 err = mlx4_cq_alloc(dev->dev, entries, &cq->buf.mtt, uar, cq->db.dma, in mlx4_ib_create_cq() 278 mlx4_mtt_cleanup(dev->dev, &cq->buf.mtt); in mlx4_ib_create_cq() 384 struct mlx4_mtt mtt; in mlx4_ib_resize_cq() local 422 mtt = cq->buf.mtt; in mlx4_ib_resize_cq() [all …]
|
D | mr.c | 95 struct mlx4_mtt *mtt, in mlx4_ib_umem_write_mtt_block() argument 134 err = mlx4_write_mtt(dev->dev, mtt, *start_index, in mlx4_ib_umem_write_mtt_block() 182 int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt, in mlx4_ib_umem_write_mtt() argument 200 mtt_shift = mtt->page_shift; in mlx4_ib_umem_write_mtt() 214 err = mlx4_ib_umem_write_mtt_block(dev, mtt, mtt_size, in mlx4_ib_umem_write_mtt() 232 err = mlx4_ib_umem_write_mtt_block(dev, mtt, mtt_size, in mlx4_ib_umem_write_mtt() 241 err = mlx4_write_mtt(dev->dev, mtt, start_index, npages, pages); in mlx4_ib_umem_write_mtt() 432 err = mlx4_ib_umem_write_mtt(dev, &mr->mmr.mtt, mr->umem); in mlx4_ib_reg_user_mr() 528 err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); in mlx4_ib_rereg_user_mr()
|
D | mlx4_ib.h | 106 struct mlx4_mtt mtt; member 325 struct mlx4_mtt mtt; member 365 struct mlx4_mtt mtt; member 731 int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt,
|
D | qp.c | 672 qp->mtt = (to_mqp( in create_qp_rss() 673 (struct ib_qp *)init_attr->rwq_ind_tbl->ind_tbl[0]))->mtt; in create_qp_rss() 927 err = mlx4_mtt_init(dev->dev, n, shift, &qp->mtt); in create_rq() 932 err = mlx4_ib_umem_write_mtt(dev, &qp->mtt, qp->umem); in create_rq() 983 mlx4_mtt_cleanup(dev->dev, &qp->mtt); in create_rq() 1122 err = mlx4_mtt_init(dev->dev, n, shift, &qp->mtt); in create_qp_common() 1127 err = mlx4_ib_umem_write_mtt(dev, &qp->mtt, qp->umem); in create_qp_common() 1175 &qp->mtt); in create_qp_common() 1179 err = mlx4_buf_write_mtt(dev->dev, &qp->mtt, &qp->buf); in create_qp_common() 1284 mlx4_mtt_cleanup(dev->dev, &qp->mtt); in create_qp_common() [all …]
|
/Linux-v5.4/include/linux/mlx4/ |
D | device.h | 684 struct mlx4_mtt mtt; member 689 struct mlx4_mtt mtt; member 846 int mtt; member 1113 struct mlx4_mtt *mtt); 1114 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt); 1115 u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt); 1125 int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 1127 int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 1138 int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, 1151 struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq);
|
D | qp.h | 477 int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 485 int mlx4_qp_to_ready(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
|
D | cq.h | 180 int entries, struct mlx4_mtt *mtt);
|
/Linux-v5.4/drivers/infiniband/hw/mlx5/ |
D | odp.c | 211 struct mlx5_ib_mr *mtt = odp->private; in mlx5_odp_populate_klm() local 213 pklm->key = cpu_to_be32(mtt->ibmr.lkey); in mlx5_odp_populate_klm() 483 struct mlx5_ib_mr *mtt; in implicit_mr_get_data() local 502 mtt = implicit_mr_alloc(mr->ibmr.pd, odp, 0, in implicit_mr_get_data() 504 if (IS_ERR(mtt)) { in implicit_mr_get_data() 507 return ERR_CAST(mtt); in implicit_mr_get_data() 510 odp->private = mtt; in implicit_mr_get_data() 511 mtt->umem = &odp->umem; in implicit_mr_get_data() 512 mtt->mmkey.iova = addr; in implicit_mr_get_data() 513 mtt->parent = mr; in implicit_mr_get_data() [all …]
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/diag/ |
D | fw_tracer.c | 178 __be64 *mtt; in mlx5_fw_tracer_create_mkey() local 183 sizeof(*mtt) * round_up(TRACER_BUFFER_PAGE_NUM, 2); in mlx5_fw_tracer_create_mkey() 191 mtt = (u64 *)MLX5_ADDR_OF(create_mkey_in, in, klm_pas_mtt); in mlx5_fw_tracer_create_mkey() 193 mtt[i] = cpu_to_be64(tracer->buff.dma + i * PAGE_SIZE); in mlx5_fw_tracer_create_mkey()
|