From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbdLMSTS (ORCPT ); Wed, 13 Dec 2017 13:19:18 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38540 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753666AbdLMSTN (ORCPT ); Wed, 13 Dec 2017 13:19:13 -0500 X-Google-Smtp-Source: ACJfBovV8epv0W2wGPlcIM0Q5AY/PEkFeeqyDT0A+YZ7hurDmygnh/7lnaOPhDQHfy1mAe6uVsN0EA== Date: Wed, 13 Dec 2017 11:19:06 -0700 From: Jason Gunthorpe To: Arnd Bergmann Cc: Steve Wise , Doug Ledford , Bharat Potnuri , Leon Romanovsky , Ganesh Goudar , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: infiniband: cxgb4: use ktime_get for timestamps Message-ID: <20171213181906.GA5984@ziepe.ca> References: <20171127114518.2662754-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171127114518.2662754-1-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 12:44:53PM +0100, Arnd Bergmann wrote: > 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 > Acked-by: Steve Wise > drivers/infiniband/hw/cxgb4/device.c | 34 +++++++++++++++------------------- > drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 ++-- > drivers/infiniband/hw/cxgb4/qp.c | 6 +++--- > drivers/infiniband/hw/cxgb4/t4.h | 4 ++-- > 4 files changed, 22 insertions(+), 26 deletions(-) Thanks, applied to -next Jason