Lines Matching refs:mctx
237 static int alloc_huge_buf(struct mlx5_context *mctx, struct mlx5_buf *buf, in alloc_huge_buf() argument
248 mlx5_spin_lock(&mctx->hugetlb_lock); in alloc_huge_buf()
249 TAILQ_FOREACH(hmem, &mctx->hugetlb_list, entry) { in alloc_huge_buf()
259 mlx5_spin_unlock(&mctx->hugetlb_lock); in alloc_huge_buf()
276 mlx5_spin_lock(&mctx->hugetlb_lock); in alloc_huge_buf()
278 TAILQ_INSERT_HEAD(&mctx->hugetlb_list, hmem, entry); in alloc_huge_buf()
280 TAILQ_INSERT_TAIL(&mctx->hugetlb_list, hmem, entry); in alloc_huge_buf()
281 mlx5_spin_unlock(&mctx->hugetlb_lock); in alloc_huge_buf()
296 mlx5_spin_lock(&mctx->hugetlb_lock); in alloc_huge_buf()
299 TAILQ_REMOVE(&mctx->hugetlb_list, hmem, entry); in alloc_huge_buf()
300 mlx5_spin_unlock(&mctx->hugetlb_lock); in alloc_huge_buf()
303 mlx5_spin_unlock(&mctx->hugetlb_lock); in alloc_huge_buf()
323 int mlx5_alloc_prefered_buf(struct mlx5_context *mctx, in mlx5_alloc_prefered_buf() argument
340 ret = alloc_huge_buf(mctx, buf, size, page_size); in mlx5_alloc_prefered_buf()
355 ret = mlx5_alloc_buf_contig(mctx, buf, size, page_size, component); in mlx5_alloc_prefered_buf()
483 int mlx5_alloc_buf_contig(struct mlx5_context *mctx, in mlx5_alloc_buf_contig() argument
492 struct ibv_context *context = &mctx->ibv_ctx; in mlx5_alloc_buf_contig()
521 mlx5_dbg(mctx->dbg_fp, MLX5_DBG_CONTIG, "block order %d, addr %p\n", in mlx5_alloc_buf_contig()
539 void mlx5_free_buf_contig(struct mlx5_context *mctx, struct mlx5_buf *buf) in mlx5_free_buf_contig() argument