From nobody Mon Jun 8 03:20:29 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 2E0313FD135; Thu, 4 Jun 2026 09:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780564083; cv=none; b=tvGwF07CbKvvJDa8nTTMnwubOWIMWboHYnUGD5qbXNrK1V6vJrzD5wi8us+N3GYF4dYP0kPyRlXCfkV1XK9EZW7e8log/vLGgvmGdvbJJVHWIoAtIxoXaEPyB+KIrpIldkE33ADeJWqMG8K5GChi20i6UKEO5YAecYzYqiJTmKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780564083; c=relaxed/simple; bh=/UXc6UvzPeFJnDHdRaptd+maQKJCG+teS5Zi9VBPKmw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ZJf9TW34Bf67eEjPT5uY6BCN4luNcdL9oM5uwCMFfrn4Vrpai9MRzGVrw8jObwrTQ+Yo+Vg+Nh/7cX5k/VWDjiBmk/KZZMF2Tq7wJFOrc3DUYIAwvnwA0JbhDw+1lwCh+KMHBQIMbVvDjxa43beDOOG3MLf3MVfK8x9/ZaGZ2wg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ng96LC/T; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rnVenZ4A; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ng96LC/T"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rnVenZ4A" Date: Thu, 04 Jun 2026 09:07:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780564080; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bP6Dtrjh1hKyEVagiZPfa2iS5nNFoIaxBo+yZgcMD6M=; b=ng96LC/T4GpmTW6L8m4BC3YIUUcv266VpPr07txqHGFJyQyjReXmF6MoeJul/Oj+j1v+Q1 s8oLRM+ALtF5atbt+9MI9lTBvotmImb3xX42IsgQUIw4tzIAgUyIh2ryDzzwn8pi3oKY5K fRg7U1PHTWm3o4NUuvxCSGbUh2z9PYVPCka94Yaj4qC/Z1bLNKVYFTrQiOH9pnD5/dEZS0 N9uhu/btBJXUWlngq9xs3CqmpjHqVFS90guJOQCC5SED58NKx6m1uq8uQwxkquFKbiKZ0U 0zELiwU2zG1zzaeEncqQT5cT13GRITLjqU+c/Bat9dN2N33aNtUEmY8SQzS2mw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780564080; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bP6Dtrjh1hKyEVagiZPfa2iS5nNFoIaxBo+yZgcMD6M=; b=rnVenZ4AatMtt5sp9hnziDNRkyxq1rafRMlqEG7NmrTSD+gt5xXuNm0OuyQ4IEhqHvaSCn /ElWZpZUSeAifmAw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/ptp] ptp: ptp_vmclock: Convert to ktime_get_snapshot_id() Cc: Thomas Gleixner , David Woodhouse , Arthur Kiyanovski , thomas.weissschuh@linutronix.de, Jacob Keller , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260529195557.281425262@kernel.org> References: <20260529195557.281425262@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178056407925.710.5831704338181381872.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/ptp branch of tip: Commit-ID: 50de63d924deb0357d510818c7443b3446a837be Gitweb: https://git.kernel.org/tip/50de63d924deb0357d510818c7443b344= 6a837be Author: Thomas Gleixner AuthorDate: Fri, 29 May 2026 22:00:16 +02:00 Committer: Thomas Gleixner CommitterDate: Thu, 04 Jun 2026 11:04:16 +02:00 ptp: ptp_vmclock: Convert to ktime_get_snapshot_id() ktime_get_snapshot() is replaced by ktime_get_snapshot_id() which allows to request a particular CLOCK ID to be captured along with the clocksource counter. Convert vmclock over and use the new system_time_snapshot::systime field, which holds the system timestamp selected by the CLOCK ID argument. No functional change intended. Signed-off-by: Thomas Gleixner Tested-by: David Woodhouse Tested-by: Arthur Kiyanovski Reviewed-by: David Woodhouse Reviewed-by: Thomas Wei=C3=9Fschuh Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20260529195557.281425262@kernel.org --- drivers/ptp/ptp_vmclock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ptp/ptp_vmclock.c b/drivers/ptp/ptp_vmclock.c index 8b630eb..0f12b54 100644 --- a/drivers/ptp/ptp_vmclock.c +++ b/drivers/ptp/ptp_vmclock.c @@ -132,7 +132,7 @@ static int vmclock_get_crosststamp(struct vmclock_state= *st, * will be derived from the *same* counter value. * * If the system isn't using the same counter, then the value - * from ktime_get_snapshot() will still be used as pre_ts, and + * from ktime_get_snapshot_id() will still be used as pre_ts, and * ptp_read_system_postts() is called to populate postts after * calling get_cycles(). * @@ -140,7 +140,7 @@ static int vmclock_get_crosststamp(struct vmclock_state= *st, * the seq_count loop. */ if (sts) { - ktime_get_snapshot(&systime_snapshot); + ktime_get_snapshot_id(CLOCK_REALTIME, &systime_snapshot); if (systime_snapshot.cs_id =3D=3D st->cs_id) { cycle =3D systime_snapshot.cycles; } else { @@ -181,7 +181,7 @@ static int vmclock_get_crosststamp(struct vmclock_state= *st, } =20 if (sts) { - sts->pre_ts =3D ktime_to_timespec64(systime_snapshot.real); + sts->pre_ts =3D ktime_to_timespec64(systime_snapshot.systime); if (systime_snapshot.cs_id =3D=3D st->cs_id) sts->post_ts =3D sts->pre_ts; } @@ -272,7 +272,7 @@ static int ptp_vmclock_getcrosststamp(struct ptp_clock_= info *ptp, if (ret =3D=3D -ENODEV) { struct system_time_snapshot systime_snapshot; =20 - ktime_get_snapshot(&systime_snapshot); + ktime_get_snapshot_id(CLOCK_REALTIME, &systime_snapshot); =20 if (systime_snapshot.cs_id =3D=3D CSID_X86_TSC || systime_snapshot.cs_id =3D=3D CSID_X86_KVM_CLK) {