Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbbKJOhw (ORCPT ); Tue, 10 Nov 2015 09:37:52 -0500 Received: from smtp.citrix.com ([66.165.176.63]:27639 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338AbbKJOhv (ORCPT ); Tue, 10 Nov 2015 09:37:51 -0500 X-IronPort-AV: E=Sophos;i="5.20,270,1444694400"; d="scan'208";a="317102954" Date: Tue, 10 Nov 2015 14:34:13 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Peter Zijlstra CC: Stefano Stabellini , , , , , , , , Subject: Re: [PATCH v2 1/7] timekeeping: introduce __current_kernel_time64 In-Reply-To: <20151110122201.GB17308@twins.programming.kicks-ass.net> Message-ID: References: <1447156675-7418-1-git-send-email-stefano.stabellini@eu.citrix.com> <20151110122201.GB17308@twins.programming.kicks-ass.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 23 On Tue, 10 Nov 2015, Peter Zijlstra wrote: > On Tue, Nov 10, 2015 at 11:57:49AM +0000, Stefano Stabellini wrote: > > __current_kernel_time64 returns a struct timespec64, without taking the > > xtime lock. Mirrors __current_kernel_time/current_kernel_time. > > It always helps if you include a reason why you want a patch. You are right, sorry. I need to get the current_kernel_time from a pvclock_gtod callback function, which cannot take the lock again. On x86 we are just calling __current_kernel_time() (see arch/x86/xen/time.c:xen_pvclock_gtod_notify). I was introducing the same functionality on ARM, when the maintainers pointed out that it might be better to use struct timespec64 and related functions for future-proofness. To do that I need a version of __current_kernel_time which returns a struct timespec64. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/