[patch V2 23/25] timekeeping: Add support for AUX clock cross timestamping

From: Thomas Gleixner

Date: Fri May 29 2026 - 16:17:39 EST


From: Thomas Gleixner <tglx@xxxxxxxxxx>

Now that all prerequisites are in place add the final support for AUX
clocks in get_device_system_crosststamp(), which enables the PTP layer to
support hardware cross timestamps with a new IOTCL.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Tested-by: Arthur Kiyanovski <akiyano@xxxxxxxxxx>
Reviewed-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
---
kernel/time/timekeeping.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1517,6 +1517,12 @@ int get_device_system_crosststamp(int (*
tkd = &tk_core;
offs = &tk_core.timekeeper.offs_real;
break;
+ case CLOCK_AUX ... CLOCK_AUX_LAST:
+ tkd = aux_get_tk_data(xtstamp->clock_id);
+ if (!tkd)
+ return -ENODEV;
+ offs = &tkd->timekeeper.offs_aux;
+ break;
default:
WARN_ON_ONCE(1);
return -ENODEV;