From patchwork Mon Jun 18 14:27:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138969 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4020202lji; Mon, 18 Jun 2018 07:27:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLNSWMK23OYXIHBojdLrodpZo+Ts+SzbzSMqFK8Ic/p5s/MTg54POpzy3vH/erTqy5ftckj X-Received: by 2002:a65:6157:: with SMTP id o23-v6mr11440205pgv.310.1529332054738; Mon, 18 Jun 2018 07:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529332054; cv=none; d=google.com; s=arc-20160816; b=EYwU33c3bnjXQmbraw/xZiFt83ve8peSdVxXs4pkn4LdrWqPFC3Jkz2c19AII56GG3 xsS/Re/scYrp5Mekww4V8Wm2Ymjdua5Nb2P65ind2EzCCC0Wqe8/I3C/sRLEDgfAXDSy 52lnXe/tNF3SnHj74z0luLi8etjWJAoUBfCKNlIDTI+Kxne4YjLsRxZbq4F4M2+5Yyjj /cLml6n864M6+HRW7M/x1TtKF6ZMmNkqu0ki2De1426GJSnuFsGWhCKPnEFKtCxpDNtM YMqMrOnJdqXb0ipAhLxL/Sr2EOvo9OoahLEEL3Jsi5e0AmEBEG52KhJ3jNyF/wntHwCY l6QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rYMYS7/yNSaqbPtimTdgHuRMiDqFfy9o8frMo4YEO8w=; b=ocz2LsGcSFHaGdeb8YWbeoitYhXlKLLRxlCDxDaRBeGw5BIPg3qgFzxx1DifpHGv0k mlLepnIsbzIpDcXjQhlrhxLq3Ai9/Zv5pINnC22CKgYeyN9nAPEaTao8nbEPd70uPdx2 U4XbDHSclqGQZW5AAULuLV+OovTuykX7KVRy9gl3jTcSYoriDWtYhnd1lKeQaZUDxqpW 9CLQFq7zX6I1WxCY/8OLtZovZmP3KslCwNQ+13kmsMcQHBGw6POkeYWW2Sj/wehATjUr 3YP9SGFZFkIPTWtgS6w8T3KtqKm9VwyWLgrXHcX8jA/lnMK9ci+CUsNBwlTcrgMaUL6+ cQjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w65-v6si14856711pfb.309.2018.06.18.07.27.34; Mon, 18 Jun 2018 07:27:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934957AbeFRO1c (ORCPT + 30 others); Mon, 18 Jun 2018 10:27:32 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43343 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934269AbeFRO1b (ORCPT ); Mon, 18 Jun 2018 10:27:31 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0M21ZH-1gMtae2vjH-00u0kz; Mon, 18 Jun 2018 16:27:19 +0200 From: Arnd Bergmann To: Corey Minyard , Arnd Bergmann , Greg Kroah-Hartman Cc: y2038@lists.linaro.org, openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] ipmi: Change to ktime_get_ts64() Date: Mon, 18 Jun 2018 16:27:09 +0200 Message-Id: <20180618142717.3683096-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:xQUMiYObpIAXkOFE9+aBJ6Mh7XpmaUZv71wXve5M+q394UXQQsX uLQDk/QEQ/Y53iKX7FE6AzfhaojvyJufy4DBdz3Cs+dhD4JWuucW2/U78Mb/kfpZndt3Vs/ Jyt1E9kTFGMnW7/YI7yj2zRFmI6MLhggbNQRby692qcod8225lG9OO0UWExtp0bptjph6Mp sStJN/TD0tXrlzu2msYxA== X-UI-Out-Filterresults: notjunk:1; V01:K0:dhzkciyFwCM=:ub9r1D0D75oGGRB8UWYf7r WmK3M+aLZQUxQgIV0UJLm4jWYA5iUvUj1LfG6tTjwstIztcRvY/ClJbYngrxiiHW30ng/LVCY 1IUa2temE8i0LS2/cdawFxzOwLDD9Fx8VUcFffHMQo1SFtktcCMNnX4VJ8PNXs+oRqTnM4pt3 hhSIxuXmYF/mtYwZTeeqclDPn5zYWs41jV9dozDwir8pW8aFbZ1L2A5hgXEdvvldgf1v958fZ KHm9Yy/3oFUHGz92Z/Dss3Dj2zn4Ix5rbJrftzbmF9kjJ7BgAbWhj9b2K/dFTmW581EmZXE5u PGyPprl2gx8CYNNaxkoJDG9/ZQme5q3N1l1WCwhUUHyQ2NsycQRwXGOzONt1t0U2irP5aeh+2 mRs24IHKyg/XyvXnIdVE6uNVN55XAFh7bi/3P/a/BC6CjysAmhDSXuAzIvauOgxZDEf6hQadN qTOa8Hk5As5dfghwji6zEkxN82q4pT6D1rtLZ5d1qSRodn7vH7m3fkDXoVKqbMhfQkQGbAFTd 0z+sxorFuJ9riGP6lnQM9/KQcCHdPZzT7nxMUiY4HJP3eDC2TscyQz9F1uVwcXMKHmRRPI6QS A8jgoByNFCUB8v1MRN7K4r8lEQRtRdPMbs6noTHhfbrdaqCrxVK1D9pgBolwYmDgfVNLImW3A IS9EO6uSpPvbV1Xk943Dv2s2rYE9GNtAET7owTK83CJTewZrSXCKv7oJ3CU1MyHEWjDk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org getnstimeofday64() is deprecated because of the inconsistent naming, it is only a wrapper around ktime_get_real_ts64() now, which could be used as a direct replacement. However, it is generally better to use CLOCK_MONOTONIC timestamps where possible, to avoid glitches with a concurrent settimeofday() or leap second. The uses in ipmi are either for debugging prints or for comparing against a prior timestamp, so using a monotonic ktime_get_ts64() is probably best here. Signed-off-by: Arnd Bergmann --- drivers/char/ipmi/ipmi_si_intf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index ad353be871bf..fb19c796f0fa 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -269,7 +269,7 @@ void debug_timestamp(char *msg) { struct timespec64 t; - getnstimeofday64(&t); + ktime_get_ts64(&t); pr_debug("**%s: %lld.%9.9ld\n", msg, (long long) t.tv_sec, t.tv_nsec); } #else @@ -961,12 +961,12 @@ static inline int ipmi_thread_busy_wait(enum si_sm_result smi_result, if (max_busy_us == 0 || smi_result != SI_SM_CALL_WITH_DELAY) ipmi_si_set_not_busy(busy_until); else if (!ipmi_si_is_busy(busy_until)) { - getnstimeofday64(busy_until); + ktime_get_ts64(busy_until); timespec64_add_ns(busy_until, max_busy_us*NSEC_PER_USEC); } else { struct timespec64 now; - getnstimeofday64(&now); + ktime_get_ts64(&now); if (unlikely(timespec64_compare(&now, busy_until) > 0)) { ipmi_si_set_not_busy(busy_until); return 0;