From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753764AbbKJPNG (ORCPT ); Tue, 10 Nov 2015 10:13:06 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:36656 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753465AbbKJPNE (ORCPT ); Tue, 10 Nov 2015 10:13:04 -0500 X-IronPort-AV: E=Sophos;i="5.20,270,1444694400"; d="scan'208";a="317126264" Date: Tue, 10 Nov 2015 15:10:11 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Arnd Bergmann CC: , Stefano Stabellini , , , , , , , Subject: Re: [PATCH v2 1/7] timekeeping: introduce __current_kernel_time64 In-Reply-To: <4372800.FdTygmcuyo@wuerfel> Message-ID: References: <1447156675-7418-1-git-send-email-stefano.stabellini@eu.citrix.com> <4372800.FdTygmcuyo@wuerfel> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Nov 2015, Arnd Bergmann wrote: > On Tuesday 10 November 2015 11:57:49 Stefano Stabellini wrote: > > __current_kernel_time64 returns a struct timespec64, without taking the > > xtime lock. Mirrors __current_kernel_time/current_kernel_time. > > > > Actually it doesn't mirror __current_kernel_time/current_kernel_time > > > diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h > > index ec89d84..b5802bf 100644 > > --- a/include/linux/timekeeping.h > > +++ b/include/linux/timekeeping.h > > @@ -19,7 +19,8 @@ extern int do_sys_settimeofday(const struct timespec *tv, > > */ > > unsigned long get_seconds(void); > > struct timespec64 current_kernel_time64(void); > > -/* does not take xtime_lock */ > > +/* do not take xtime_lock */ > > +struct timespec64 __current_kernel_time64(void); > > struct timespec __current_kernel_time(void); > > Please change __current_kernel_time into a static inline function > while you are introducing the new one, to match the patch description ;-) The implementation is: struct timekeeper *tk = &tk_core.timekeeper; return timespec64_to_timespec(tk_xtime(tk)); which cannot be easily made into a static inline, unless we start exporting tk_core. From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano.stabellini@eu.citrix.com (Stefano Stabellini) Date: Tue, 10 Nov 2015 15:10:11 +0000 Subject: [PATCH v2 1/7] timekeeping: introduce __current_kernel_time64 In-Reply-To: <4372800.FdTygmcuyo@wuerfel> References: <1447156675-7418-1-git-send-email-stefano.stabellini@eu.citrix.com> <4372800.FdTygmcuyo@wuerfel> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, 10 Nov 2015, Arnd Bergmann wrote: > On Tuesday 10 November 2015 11:57:49 Stefano Stabellini wrote: > > __current_kernel_time64 returns a struct timespec64, without taking the > > xtime lock. Mirrors __current_kernel_time/current_kernel_time. > > > > Actually it doesn't mirror __current_kernel_time/current_kernel_time > > > diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h > > index ec89d84..b5802bf 100644 > > --- a/include/linux/timekeeping.h > > +++ b/include/linux/timekeeping.h > > @@ -19,7 +19,8 @@ extern int do_sys_settimeofday(const struct timespec *tv, > > */ > > unsigned long get_seconds(void); > > struct timespec64 current_kernel_time64(void); > > -/* does not take xtime_lock */ > > +/* do not take xtime_lock */ > > +struct timespec64 __current_kernel_time64(void); > > struct timespec __current_kernel_time(void); > > Please change __current_kernel_time into a static inline function > while you are introducing the new one, to match the patch description ;-) The implementation is: struct timekeeper *tk = &tk_core.timekeeper; return timespec64_to_timespec(tk_xtime(tk)); which cannot be easily made into a static inline, unless we start exporting tk_core. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH v2 1/7] timekeeping: introduce __current_kernel_time64 Date: Tue, 10 Nov 2015 15:10:11 +0000 Message-ID: References: <1447156675-7418-1-git-send-email-stefano.stabellini@eu.citrix.com> <4372800.FdTygmcuyo@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: <4372800.FdTygmcuyo@wuerfel> Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, Stefano Stabellini , xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, peterz@infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, tglx@linutronix.de, mingo@kernel.org List-Id: xen-devel@lists.xenproject.org On Tue, 10 Nov 2015, Arnd Bergmann wrote: > On Tuesday 10 November 2015 11:57:49 Stefano Stabellini wrote: > > __current_kernel_time64 returns a struct timespec64, without taking the > > xtime lock. Mirrors __current_kernel_time/current_kernel_time. > > > > Actually it doesn't mirror __current_kernel_time/current_kernel_time > > > diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h > > index ec89d84..b5802bf 100644 > > --- a/include/linux/timekeeping.h > > +++ b/include/linux/timekeeping.h > > @@ -19,7 +19,8 @@ extern int do_sys_settimeofday(const struct timespec *tv, > > */ > > unsigned long get_seconds(void); > > struct timespec64 current_kernel_time64(void); > > -/* does not take xtime_lock */ > > +/* do not take xtime_lock */ > > +struct timespec64 __current_kernel_time64(void); > > struct timespec __current_kernel_time(void); > > Please change __current_kernel_time into a static inline function > while you are introducing the new one, to match the patch description ;-) The implementation is: struct timekeeper *tk = &tk_core.timekeeper; return timespec64_to_timespec(tk_xtime(tk)); which cannot be easily made into a static inline, unless we start exporting tk_core.