Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

timekeeping: Add AUX offset to struct timekeeper

This offset will be used in the time getters of auxiliary clocks. It is
added to the "monotonic" clock readout.

As auxiliary clocks do not utilize the offset fields of the core time
keeper, this is just an alias for offs_tai, so that the cache line layout
stays the same.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20250519083026.533486349@linutronix.de

+8 -1
+8 -1
include/linux/timekeeper_internal.h
··· 67 67 * @offs_real: Offset clock monotonic -> clock realtime 68 68 * @offs_boot: Offset clock monotonic -> clock boottime 69 69 * @offs_tai: Offset clock monotonic -> clock tai 70 + * @offs_aux: Offset clock monotonic -> clock AUX 70 71 * @coarse_nsec: The nanoseconds part for coarse time getters 71 72 * @id: The timekeeper ID 72 73 * @tkr_raw: The readout base structure for CLOCK_MONOTONIC_RAW ··· 114 113 * @monotonic_to_boottime is a timespec64 representation of @offs_boot to 115 114 * accelerate the VDSO update for CLOCK_BOOTTIME. 116 115 * 116 + * @offs_aux is used by the auxiliary timekeepers which do not utilize any 117 + * of the regular timekeeper offset fields. 118 + * 117 119 * The cacheline ordering of the structure is optimized for in kernel usage of 118 120 * the ktime_get() and ktime_get_ts64() family of time accessors. Struct 119 121 * timekeeper is prepended in the core timekeeping code with a sequence count, ··· 143 139 struct timespec64 wall_to_monotonic; 144 140 ktime_t offs_real; 145 141 ktime_t offs_boot; 146 - ktime_t offs_tai; 142 + union { 143 + ktime_t offs_tai; 144 + ktime_t offs_aux; 145 + }; 147 146 u32 coarse_nsec; 148 147 enum timekeeper_ids id; 149 148