<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/timekeeping.h, branch v7.3-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-11T16:11:20+00:00</updated>
<entry>
<title>timekeeping: Use u32 for clock_was_set_seq</title>
<updated>2026-08-11T16:11:20+00:00</updated>
<author>
<name>Thomas Weißschuh (Schneider Electric)</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-08-03T10:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=406a037ce7a03a37bf2b03010791ea9343ecc233'/>
<id>urn:sha1:406a037ce7a03a37bf2b03010791ea9343ecc233</id>
<content type='text'>
Use an explicitly sized type to make the code a bit more consistent
with other fields of the datastructure and other sequence counters.

Signed-off-by: Thomas Weißschuh (Schneider Electric) &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-2-910cbd485390@linutronix.de
</content>
</entry>
<entry>
<title>timekeeping: Annotate auxiliary clock accessors with __must_check</title>
<updated>2026-08-11T09:12:43+00:00</updated>
<author>
<name>Thomas Weißschuh (Schneider Electric)</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-31T14:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2838bdb772e4e94591a90437bf595dba485a3162'/>
<id>urn:sha1:2838bdb772e4e94591a90437bf595dba485a3162</id>
<content type='text'>
In contrast to the system time accessors, the ones for auxiliary clocks can
fail.

Make sure the callers check for this.

Signed-off-by: Thomas Weißschuh (Schneider Electric) &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260731-timekeeping-aux-must-check-v1-2-11ae93068497@linutronix.de
</content>
</entry>
<entry>
<title>timekeeping: Remove the unused ktime_get_clock_ts64()</title>
<updated>2026-08-11T09:12:43+00:00</updated>
<author>
<name>Thomas Weißschuh (Schneider Electric)</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-31T14:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b515771872174553fe70eadb8efecfa49035922'/>
<id>urn:sha1:1b515771872174553fe70eadb8efecfa49035922</id>
<content type='text'>
The last user was removed in commit a6d799608e6a ("ptp: Switch to
ktime_get_snapshot_id() for pre/post timestamps").

Signed-off-by: Thomas Weißschuh (Schneider Electric) &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260731-timekeeping-aux-must-check-v1-1-11ae93068497@linutronix.de
</content>
</entry>
<entry>
<title>timekeeping: Document monotonic raw timestamps in snapshots correctly</title>
<updated>2026-07-06T15:47:44+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-07-05T12:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e2904ddb14a4198ad31eb12a072a6923f0c8ca09'/>
<id>urn:sha1:e2904ddb14a4198ad31eb12a072a6923f0c8ca09</id>
<content type='text'>
The comments related to raw monotonic timestamps for the various
snapshot mechanisms in code and struct documentation are ambiguous. They
reference them as CLOCK_MONOTONIC_RAW timestamps, but with the arrival
of AUX clocks that's not longer correct.

The raw monotonic timestamps only represent CLOCK_MONOTONIC_RAW for the
system time clock IDs, i.e. REALTIME, MONOTONIC, BOOTTIME, TAI.

For AUX clocks they refer to the monotonic raw clock which is related to
the individual AUX clocks. These monotonic raw timestamps have the same
conversion factor as CLOCK_MONOTONIC_RAW, but differ from that by an
offset:

	MONORAW(AUX$N) = MONORAW(SYSTEM) + OFFSET(AUX$N)

The offset is established when a AUX clock is enabled and stays constant
for the lifetime of the AUX clock.

Update the comments so they reflect reality.

Reported-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Link: https://patch.msgid.link/87wlv9k3wz.ffs@fw13
</content>
</entry>
<entry>
<title>timekeeping: Add clocksource read_snapshot() method and hw_cycles to snapshot</title>
<updated>2026-06-04T09:04:18+00:00</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2026-05-29T20:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca1ec8bfac8c95d0fed9e3611ea21400d1f37262'/>
<id>urn:sha1:ca1ec8bfac8c95d0fed9e3611ea21400d1f37262</id>
<content type='text'>
Add a read_snapshot() callback to struct clocksource which returns the
derived clocksource value while also providing the underlying hardware
counter reading and the related clocksource ID.

This allows ktime_get_snapshot_id() to populate new hw_cycles and hw_csid
fields in struct system_time_snapshot.

For clocksources that are derived from an underlying counter (e.g., Hyper-V
TSC page scales TSC to 10MHz, kvmclock scales TSC to 1GHz), this provides
atomic access to both the derived value needed for timekeeping
calculations, and the raw hardware counter needed by consumers like KVM's
master clock and the vmclock PTP driver.

[ tglx: Reworked it slightly ]

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Assisted-by: Kiro:claude-opus-4.6-1m
Link: https://patch.msgid.link/20260526230635.136914-1-dwmw2@infradead.org
Link: https://patch.msgid.link/20260529195558.202568489@kernel.org
</content>
</entry>
<entry>
<title>timekeeping: Remove system_device_crosststamp::sys_realtime</title>
<updated>2026-06-04T09:04:17+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-05-29T20:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ccaf1e569f04d8fd5f0167be728fdb48f448f81'/>
<id>urn:sha1:5ccaf1e569f04d8fd5f0167be728fdb48f448f81</id>
<content type='text'>
All users are converted to sys_systime.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Tested-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Reviewed-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20260529195558.046694580@kernel.org
</content>
</entry>
<entry>
<title>timekeeping: Prepare for cross timestamps on arbitrary clock IDs</title>
<updated>2026-06-04T09:04:17+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-05-29T20:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09fb74f77e02489d1d8c555d44bab99d4905127c'/>
<id>urn:sha1:09fb74f77e02489d1d8c555d44bab99d4905127c</id>
<content type='text'>
PTP device system crosstime stamps support only CLOCK_REALTIME, which is
meaningless for AUX clocks. The PTP core hands in the clock ID already, so
prepare the core code to honor it.

 - Add a new sys_systime field to struct system_device_crosststamp which
   aliases the sys_realtime field. Once all users are converted
   sys_realtime can be removed.

 - Prepare get_device_system_crosststamp() and the related code for it by
   switching to sys_systime and providing the initial changes to utilize
   different time keepers.

No functional change intended.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Tested-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Reviewed-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20260529195557.846634842@kernel.org
</content>
</entry>
<entry>
<title>timekeeping: Remove ktime_get_snapshot()</title>
<updated>2026-06-04T09:04:17+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-05-29T20:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b21d442c9aebe5ed95303883d3365e430e134cf1'/>
<id>urn:sha1:b21d442c9aebe5ed95303883d3365e430e134cf1</id>
<content type='text'>
All users have been converted to ktime_get_snapshot_id().

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Tested-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Reviewed-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20260529195557.795510496@kernel.org
</content>
</entry>
<entry>
<title>timekeeping: Add CLOCK ID to system_device_crosststamp</title>
<updated>2026-06-04T09:04:16+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-05-29T20:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3b8d03faa4d266d19ff7a7534e7bf810ff681cf'/>
<id>urn:sha1:e3b8d03faa4d266d19ff7a7534e7bf810ff681cf</id>
<content type='text'>
The normal capture for system/device cross timestamps is CLOCK_REALTIME,
but that's meaningless for AUX clocks.

Add a clock_id field to struct system_device_crosststamp and initialize it
with CLOCK_REALTIME at the two places which prepare for cross
timestamps.

After the related code has been cleaned up, the core code will honor the
clock_id field when calculating the system time from the system counter
snapshot.

No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Tested-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Reviewed-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20260529195557.482153523@kernel.org
</content>
</entry>
<entry>
<title>timekeeping: Add system_counterval_t to struct system_device_crosststamp</title>
<updated>2026-06-04T09:04:16+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-05-29T20:00:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c14771816435a7ecf52d981a341e2de21463268'/>
<id>urn:sha1:6c14771816435a7ecf52d981a341e2de21463268</id>
<content type='text'>
An upcoming extension to the PTP IOCTL requires to return the system counter
value and the clocksource ID to user space. get_device_system_crosststamp() has
this information already.

Extend struct system_device_crosststamp with a system_counterval_t member
and fill in the data.

Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Tested-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Reviewed-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20260529195557.429406675@kernel.org
</content>
</entry>
</feed>
