summaryrefslogtreecommitdiff
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-06-11 16:35:26 +0300
committerDoug Ledford <dledford@redhat.com>2015-06-12 14:49:10 -0400
commit52033cfb5aab2a54e238e93c9e52f61c2c5708aa (patch)
tree2fa1c99afee51a719b168c7b3175cdce25bb4090 /include/linux/mlx4
parent2528e33e680921d95092f83c4a64046744f111b3 (diff)
IB/mlx4: Add mmap call to map the hardware clock
In order to read the HCA's cycle counter efficiently in user space, we need to map the HCA's register. This is done through mmap call. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 83e80ab94500..f94984fb8bb2 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -829,6 +829,12 @@ struct mlx4_dev {
struct mlx4_vf_dev *dev_vfs;
};
+struct mlx4_clock_params {
+ u64 offset;
+ u8 bar;
+ u8 size;
+};
+
struct mlx4_eqe {
u8 reserved1;
u8 type;
@@ -1485,4 +1491,7 @@ int mlx4_ACCESS_PTYS_REG(struct mlx4_dev *dev,
enum mlx4_access_reg_method method,
struct mlx4_ptys_reg *ptys_reg);
+int mlx4_get_internal_clock_params(struct mlx4_dev *dev,
+ struct mlx4_clock_params *params);
+
#endif /* MLX4_DEVICE_H */