diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-05-29 23:01:00 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-06-04 12:04:17 +0300 |
| commit | 09fb74f77e02489d1d8c555d44bab99d4905127c (patch) | |
| tree | 5565d34bc530458afbb9068c1781bf454826b3de /include/linux | |
| parent | b21d442c9aebe5ed95303883d3365e430e134cf1 (diff) | |
| download | linux-09fb74f77e02489d1d8c555d44bab99d4905127c.tar.xz | |
timekeeping: Prepare for cross timestamps on arbitrary clock IDs
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 <tglx@kernel.org>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
Tested-by: Arthur Kiyanovski <akiyano@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260529195557.846634842@kernel.org
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/timekeeping.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 2d9860ecb285..017599d04eb4 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -319,13 +319,18 @@ struct system_counterval_t { * @device: Device time * @sys_counter: Clocksource counter value simultaneous with device time * @sys_realtime: Realtime simultaneous with device time + * @sys_systime: System time for @clock_id * @sys_monoraw: Monotonic raw simultaneous with device time */ struct system_device_crosststamp { clockid_t clock_id; ktime_t device; struct system_counterval_t sys_counter; - ktime_t sys_realtime; + union { + /* realtime goes away once all users are converted */ + ktime_t sys_realtime; + ktime_t sys_systime; + }; ktime_t sys_monoraw; }; |
