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 A34203DA7D2; Tue, 2 Jun 2026 09:46:13 +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=1780393575; cv=none; b=MPM7JfiLiZ5XOnvmmJI/d5tAD6cH9TgyRN6LddsdZ/kGTObZYFArlaP0DF6wQW3IWebf/DTXtYAWJ3qkslRaJRsdOKE8V1vqyZyKcteiu8NmbUbtNfFSvOjhZ+/iUKeFFBi1Jvxt3zq+5+QtVLeZOPY5RSzy2Je75jOgjAmMQmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780393575; c=relaxed/simple; bh=Nmqey/O/7nmY474ppAgEJj3Gc7utstP+Wye6bPhkOXM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fitqfGIdU5KXiTCYu0y5KaoPFfNPq52H4SGibu7bD4SYRvp+RmL1eRKroFU+JHkxpHvskYQzqMsy9Q4XIPlfztWejQKSUpGkPBGcHAGF7kq0MAFegP80xHhpeUefuR8i+3g+Fc23kWQvQf46ABW/elhebDLKdHx9qFN7itk4Zfk= 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=LjOHnDQ/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qkPsMhaT; 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="LjOHnDQ/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qkPsMhaT" Date: Tue, 02 Jun 2026 09:46:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780393572; 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=GxHMqS/4xmAT6Qv8EL/zva412Z1JXTY29+qerw+fFVQ=; b=LjOHnDQ/JcO2HzSo6t7dpwgXIh3TU3ywTD3lBF0tPHYvBeqH2Qp7UN+3v7hl5M3eWyiUge 07eElCP9mesbJerXoXRC4T6SVXD96GlbQkFuX8CAyUCYKAx1ndrX0Le5Z7AVU+9wcZ1c3I PewMxI4kcUO6+83nDyw95zQuiJACBccAlIqmBmUejBZcdqGVHGgVgkEWw6LFPqQjXNXRX4 nSMXD4TSnyRZUK5hGHbjSRGzUm/IQNU8f1P1pPRVybzZQtDEnxjdNHGHFwJ1PK9K/2Z7BW bVd2lEajm/vByMF+44DVD6WZ5XpN1ySNtT05Yz5AkpVKak3yiXKxQlDGelpAaA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780393572; 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=GxHMqS/4xmAT6Qv8EL/zva412Z1JXTY29+qerw+fFVQ=; b=qkPsMhaT2T4KnoTqfPYBICeQ/W7xWNbmYNqz7UgMZoMQhA+7FmcZ8YdIQix4oazQo14bh7 COY6bJjh8eY9BZBg== 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: <178039357085.2140988.8538110292408416434.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: d3dae55436460830abb99e0519a093469ad08416 Gitweb: https://git.kernel.org/tip/d3dae55436460830abb99e0519a093469= ad08416 Author: Thomas Gleixner AuthorDate: Fri, 29 May 2026 22:00:16 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 02 Jun 2026 11:39:58 +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) {