aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/mlx5_ib.h
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-12-15 20:30:13 +0200
committerDoug Ledford <dledford@redhat.com>2015-12-23 23:25:59 -0500
commitd69e3bcf79764ed833e0cc6e0645dc87589cec22 (patch)
tree5f443d6aafe32729363f65f2035bea6d892b0763 /drivers/infiniband/hw/mlx5/mlx5_ib.h
parentIB/mlx5: Add hca_core_clock_offset to udata in init_ucontext (diff)
downloadlinux-dev-d69e3bcf79764ed833e0cc6e0645dc87589cec22.tar.xz
linux-dev-d69e3bcf79764ed833e0cc6e0645dc87589cec22.zip
IB/mlx5: Mmap the HCA's core clock register to user-space
In order to read the HCA's current cycles register, we need to map it to user-space. Add support to map this register via mmap command. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-by: Moshe Lazer <moshel@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/mlx5/mlx5_ib.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index b2a66432b865..1303487ffe6b 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -65,7 +65,9 @@ enum {
enum mlx5_ib_mmap_cmd {
MLX5_IB_MMAP_REGULAR_PAGE = 0,
- MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1, /* always last */
+ MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1,
+ /* 5 is chosen in order to be compatible with old versions of libmlx5 */
+ MLX5_IB_MMAP_CORE_CLOCK = 5,
};
enum {