Some kernel ABI stuff ended up in mlx5.h for some reason. Done with: $ sed -i \ -e 's/MLX5_MMAP_GET_CONTIGUOUS_PAGES_CMD/MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES/g' \ -e 's/MLX5_MMAP_GET_CORE_CLOCK_CMD/MLX5_IB_MMAP_CORE_CLOCK/g' \ -e 's/MLX5_MMAP_ALLOC_WC/MLX5_IB_MMAP_ALLOC_WC/g' \ -e 's/MLX5_MMAP_GET_CLOCK_INFO_CMD/MLX5_IB_MMAP_CLOCK_INFO/g' Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- providers/mlx5/buf.c | 2 +- providers/mlx5/mlx5.c | 8 ++++---- providers/mlx5/mlx5.h | 7 ------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/providers/mlx5/buf.c b/providers/mlx5/buf.c index 89573caa73628b..2844ef9d3103a0 100644 --- a/providers/mlx5/buf.c +++ b/providers/mlx5/buf.c @@ -552,7 +552,7 @@ int mlx5_alloc_buf_contig(struct mlx5_context *mctx, do { offset = 0; - set_command(MLX5_MMAP_GET_CONTIGUOUS_PAGES_CMD, &offset); + set_command(MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES, &offset); set_order(block_size_exp, &offset); addr = mmap(NULL , size, PROT_WRITE | PROT_READ, MAP_SHARED, context->cmd_fd, page_size * offset); diff --git a/providers/mlx5/mlx5.c b/providers/mlx5/mlx5.c index cece1de1fdf40c..55902415151179 100644 --- a/providers/mlx5/mlx5.c +++ b/providers/mlx5/mlx5.c @@ -625,7 +625,7 @@ static int mlx5_map_internal_clock(struct mlx5_device *mdev, void *hca_clock_page; off_t offset = 0; - set_command(MLX5_MMAP_GET_CORE_CLOCK_CMD, &offset); + set_command(MLX5_IB_MMAP_CORE_CLOCK, &offset); hca_clock_page = mmap(NULL, mdev->page_size, PROT_READ, MAP_SHARED, ibv_ctx->cmd_fd, mdev->page_size * offset); @@ -649,7 +649,7 @@ static void mlx5_map_clock_info(struct mlx5_device *mdev, void *clock_info_page; off_t offset = 0; - set_command(MLX5_MMAP_GET_CLOCK_INFO_CMD, &offset); + set_command(MLX5_IB_MMAP_CLOCK_INFO, &offset); set_index(MLX5_IB_CLOCK_INFO_V1, &offset); clock_info_page = mmap(NULL, mdev->page_size, PROT_READ, MAP_SHARED, ibv_ctx->cmd_fd, @@ -867,7 +867,7 @@ static off_t get_uar_mmap_offset(int idx, int page_size, int command) set_command(command, &offset); - if (command == MLX5_MMAP_ALLOC_WC && + if (command == MLX5_IB_MMAP_ALLOC_WC && idx >= (1 << MLX5_IB_MMAP_CMD_SHIFT)) set_extended_index(idx, &offset); else @@ -903,7 +903,7 @@ void *mlx5_mmap(struct mlx5_uar_info *uar, int index, int cmd_fd, int page_size, */ offset = get_uar_mmap_offset(index, page_size, (uar_type == MLX5_UAR_TYPE_REGULAR_DYN) ? - MLX5_MMAP_ALLOC_WC : + MLX5_IB_MMAP_ALLOC_WC : MLX5_MMAP_GET_REGULAR_PAGES_CMD); uar->reg = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, cmd_fd, offset); diff --git a/providers/mlx5/mlx5.h b/providers/mlx5/mlx5.h index b1c30f2b6eac4c..d3f0829b80d3c8 100644 --- a/providers/mlx5/mlx5.h +++ b/providers/mlx5/mlx5.h @@ -57,13 +57,6 @@ enum { MLX5_IB_MMAP_CMD_MASK = 0xff, }; -enum { - MLX5_MMAP_GET_CONTIGUOUS_PAGES_CMD = 1, - MLX5_MMAP_GET_CORE_CLOCK_CMD = 5, - MLX5_MMAP_ALLOC_WC = 6, - MLX5_MMAP_GET_CLOCK_INFO_CMD = 7, -}; - enum { MLX5_CQE_VERSION_V0 = 0, MLX5_CQE_VERSION_V1 = 1, -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html