Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933582AbbKMKm3 (ORCPT ); Fri, 13 Nov 2015 05:42:29 -0500 Received: from smtp.citrix.com ([66.165.176.89]:21054 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932829AbbKMKmY (ORCPT ); Fri, 13 Nov 2015 05:42:24 -0500 X-IronPort-AV: E=Sophos;i="5.20,286,1444694400"; d="scan'208";a="312042750" Message-ID: <5645BE8C.6050109@citrix.com> Date: Fri, 13 Nov 2015 10:42:20 +0000 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Stefano Stabellini , CC: , , , , , John Stultz Subject: Re: [Xen-devel] [PATCH v4 7/7] xen/x86: support XENPF_settime64 References: <1447349448-22610-7-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: <1447349448-22610-7-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1115 Lines: 34 On 12/11/15 17:30, Stefano Stabellini wrote: > Try XENPF_settime64 first, if it is not available fall back to > XENPF_settime32. > > No need to call __current_kernel_time() when all the info needed are > already passed via the struct timekeeper * argument. > > Return NOTIFY_BAD in case of errors. [...] > @@ -123,9 +124,13 @@ static int xen_pvclock_gtod_notify(struct notifier_block *nb, > static struct timespec next_sync; > > struct xen_platform_op op; > - struct timespec now; > + struct timespec64 now; > + struct timekeeper *tk = priv; > + static bool settime64_supported = true; > + int ret; > > - now = __current_kernel_time(); > + now.tv_sec = tk->xtime_sec; > + now.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); I think you should introduce __current_kernel_time64() or make tk_xtime() available. John, what do you think? David -- 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/