From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18C75288C0E; Thu, 4 Jun 2026 01:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780538112; cv=none; b=d76PQcnaMgsddk4vGGuNj4lEqQtXAmiZ+001bo4gVMBJJ1oBfgL+Ed4doKRZ//8eZwsthDgbq1v5YRYc13WVqaMs0+IH4BKaw6sZkjrpoWt4pgJDThYKBLofe75wf1A2fU60qbfddkf5a2zrOQAImGIVTDeNNir6xq9x55ZXyRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780538112; c=relaxed/simple; bh=Eak+Q8fXfidn3Y8bFg6htoX4D/9III1Awv09pFV/WDc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fyNThEQZEk2bmDJFc6pORt7i+x6uwP/Eask36IjQMSqcLn3YSHCXgjxbHA0V3lrZ6lMOvd9ip2df0Xon9SaFXXOKD+IVq7s61ceai/7W9eDuUcyq+8r0FzmwsSwpqSb0UqbJs9HESOvqXd93cKMQ/FoeeKkGSNK3Lsn191P3Ank= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ne13J95E; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ne13J95E" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 961531F00893; Thu, 4 Jun 2026 01:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780538110; bh=m80c03+4BT7QnLJwau8oWOPIldbq7xF0zL5VxrScjhI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Ne13J95E7RKjNyNRiPK1j2Hx75hDKOnE1W0QOPpm+rC6mhheIBfWxIJQ9SXrGdD81 fbDP7+t57EDTxkccKwZiKaur8e5Ud0PzFeX3FwochKzhf/kPlR3j+WevtmVoPOWEEE DnHz0EumIWgA1gb6gqjETZpfXAZR51NeX41359+wrfX+2vn8c27vEm24my3F4CtjNJ NAAwmzEvVTEt8Fw4jUlTA2xb/JuKAX6jAjBzBjkWoX0fPMfgMC0bnfxMr03wJOwk1d pPrwoqct27qg5Z4G8t/D4zFMKGoV5FRJoe4I6bygu6B1zWzJsghgc6SOnyfUBNRO1o bFWCGrSi+h8DA== Date: Wed, 3 Jun 2026 18:55:06 -0700 From: Nathan Chancellor To: Thomas Gleixner Cc: linux-tip-commits@vger.kernel.org, Arthur Kiyanovski , David Woodhouse , thomas.weissschuh@linutronix.de, Jacob Keller , Marc Zyngier , Vincent Donnefort , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [tip: timers/ptp] KVM: arm64: Use ktime_get_snapshot_id() to retrieve CLOCK_BOOTTIME Message-ID: <20260604015506.GA1998428@ax162> References: <20260529195557.174373054@kernel.org> <178039357339.2140988.14096735224557177086.tip-bot2@tip-bot2> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <178039357339.2140988.14096735224557177086.tip-bot2@tip-bot2> Hi Thomas, On Tue, Jun 02, 2026 at 09:46:13AM -0000, tip-bot2 for Thomas Gleixner wrote: > The following commit has been merged into the timers/ptp branch of tip: > > Commit-ID: d09439210441efbadd8b0aa32c1ddb1eab2f3abd > Gitweb: https://git.kernel.org/tip/d09439210441efbadd8b0aa32c1ddb1eab2f3abd > Author: Thomas Gleixner > AuthorDate: Fri, 29 May 2026 22:00:08 +02:00 > Committer: Thomas Gleixner > CommitterDate: Tue, 02 Jun 2026 11:39:58 +02:00 > > KVM: arm64: Use ktime_get_snapshot_id() to retrieve CLOCK_BOOTTIME ... > arch/arm64/kvm/hyp_trace.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/kvm/hyp_trace.c b/arch/arm64/kvm/hyp_trace.c > index 8b7f2bf..b056c65 100644 > --- a/arch/arm64/kvm/hyp_trace.c > +++ b/arch/arm64/kvm/hyp_trace.c > @@ -51,8 +51,8 @@ static void __hyp_clock_work(struct work_struct *work) > > hyp_clock = container_of(dwork, struct hyp_trace_clock, work); > > - ktime_get_snapshot(&snap); > - boot = ktime_to_ns(snap.boot); > + ktime_get_snapshot_id(CLOCK_BOOTTIME, &snap); > + boot = ktime_to_ns(snap.systime); > > delta_boot = boot - hyp_clock->boot; > delta_cycles = snap.cycles - hyp_clock->cycles; > @@ -118,9 +118,9 @@ static void hyp_trace_clock_enable(struct hyp_trace_clock *hyp_clock, bool enabl > hyp_clock->running = false; > } > > - ktime_get_snapshot(&snap); > + ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME); It looks like this instance of ktime_get_snapshot_id() did not get its arguments swapped when applied, which breaks the build in -next: arch/arm64/kvm/hyp_trace.c:121:24: error: incompatible pointer to integer conversion passing 'struct system_time_snapshot *' to parameter of type 'clockid_t' (aka 'int') [-Wint-conversion] 121 | ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME); | ^~~~~ include/linux/timekeeping.h:357:45: note: passing argument to parameter 'clock_id' here 357 | extern void ktime_get_snapshot_id(clockid_t clock_id, struct system_time_snapshot *systime_snapshot); | ^ arch/arm64/kvm/hyp_trace.c:121:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct system_time_snapshot *' [-Wint-conversion] 121 | ktime_get_snapshot_id(&snap, CLOCK_BOOTTIME); | ^~~~~~~~~~~~~~ include/uapi/linux/time.h:56:26: note: expanded from macro 'CLOCK_BOOTTIME' 56 | #define CLOCK_BOOTTIME 7 | ^ include/linux/timekeeping.h:357:84: note: passing argument to parameter 'systime_snapshot' here 357 | extern void ktime_get_snapshot_id(clockid_t clock_id, struct system_time_snapshot *systime_snapshot); | ^ 2 errors generated. Do you want a fix up patch or do you want to just squash in the fix? > - hyp_clock->boot = ktime_to_ns(snap.boot); > + hyp_clock->boot = ktime_to_ns(snap.systime); > hyp_clock->cycles = snap.cycles; > hyp_clock->mult = 0; > -- Cheers, Nathan