From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [RFC PATCH v2 09/11] time: Convert pvclock_read_wallclock() to use timespec64 Date: Thu, 30 Oct 2014 11:37:48 +0000 Message-ID: <5452230C.6020504@citrix.com> References: <1414667745-7703-1-git-send-email-pang.xunlei@linaro.org> <1414667745-7703-10-git-send-email-pang.xunlei@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xjo38-0005FD-1m for xen-devel@lists.xenproject.org; Thu, 30 Oct 2014 11:37:54 +0000 In-Reply-To: <1414667745-7703-10-git-send-email-pang.xunlei@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "pang.xunlei" , linux-kernel@vger.kernel.org Cc: Alessandro Zummo , rtc-linux@googlegroups.com, Stefano Stabellini , John Stultz , xen-devel@lists.xenproject.org, Thomas Gleixner List-Id: xen-devel@lists.xenproject.org On 30/10/14 11:15, pang.xunlei wrote: > As part of addressing 2038 safety for in-kernel uses, this patch > creates no functional change, converts pvclock_read_wallclock() > to use timespec64 instead of timespec. Acked-by: David Vrabel With one minor comment: > > /* get wallclock at system boot */ > do { > version = wall_clock->version; > rmb(); /* fetch version before time */ > - now.tv_sec = wall_clock->sec; > + /* TODO: [2038 safety] wall_clock->sec uses time64_t */ > + now.tv_sec = (time64_t)wall_clock->sec; The size of wall_clock->sec is fixed as part of the hypervisor ABI so there's nothing TODO here (it would require extensions to the hypervisor ABI and thus a new pvclock_read_wallclock64() call or similar). David