summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
diff options
context:
space:
mode:
authorArnd Bergmann2017-11-27 12:44:53 +0100
committerJason Gunthorpe2017-12-13 19:00:13 +0100
commitf8109d9e7de550a28d620144b0fe31e661e02bcb (patch)
treec8b414fd3b14457dad2a96178460ecd3f5920d10 /drivers/infiniband/hw/cxgb4/iw_cxgb4.h
parentRDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo() (diff)
downloadkernel-qcow2-linux-f8109d9e7de550a28d620144b0fe31e661e02bcb.tar.gz
kernel-qcow2-linux-f8109d9e7de550a28d620144b0fe31e661e02bcb.tar.xz
kernel-qcow2-linux-f8109d9e7de550a28d620144b0fe31e661e02bcb.zip
infiniband: cxgb4: use ktime_get for timestamps
The debugfs file prints the difference between host timestamps as a seconds/nanoseconds tuple, along with a 64-bit nanoseconds hardware timestamp. The host time is read using getnstimeofday() which is deprecated because of the y2038 overflow, and it suffers from time jumps during settimeofday() and leap seconds. Converting to ktime_get_ts64() would solve those two, but I'm going a little further here by changing to ktime_get() and printing 64-bit nanoseconds on both host and hw timestamps. This simplifies the code further and makes the output easier to understand. The format of the debugfs file obviously changes here, but this should only be read by humans and not scripts, so I assume it's fine. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/iw_cxgb4.h')
-rw-r--r--drivers/infiniband/hw/cxgb4/iw_cxgb4.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
index 470f97a79ebb..37ff2ad8a3d4 100644
--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
@@ -153,8 +153,8 @@ struct c4iw_hw_queue {
};
struct wr_log_entry {
- struct timespec post_host_ts;
- struct timespec poll_host_ts;
+ ktime_t post_host_time;
+ ktime_t poll_host_time;
u64 post_sge_ts;
u64 cqe_sge_ts;
u64 poll_sge_ts;