time: Introduce auxiliary POSIX clocks

To support auxiliary timekeeping and the related user space interfaces,
it's required to define a clock ID range for them.

Reserve 8 auxiliary clock IDs after the regular timekeeping clock ID space.

This is the maximum number of auxiliary clocks the kernel can support. The actual
number of supported clocks depends obviously on the presence of related devices
and might be constraint by the available VDSO space.

Add the corresponding timekeeper IDs as well.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20250519083025.905800695@linutronix.de
This commit is contained in:
Anna-Maria Behnsen
2025-05-19 10:33:20 +02:00
committed by Thomas Gleixner
parent f12b45862c
commit 9094c72c3d
3 changed files with 32 additions and 4 deletions

View File

@@ -13,11 +13,17 @@
/**
* timekeeper_ids - IDs for various time keepers in the kernel
* @TIMEKEEPER_CORE: The central core timekeeper managing system time
* @TIMEKEEPERS_MAX: The maximum number of timekeepers managed
* @TIMEKEEPER_CORE: The central core timekeeper managing system time
* @TIMEKEEPER_AUX_FIRST: The first AUX timekeeper
* @TIMEKEEPER_AUX_LAST: The last AUX timekeeper
* @TIMEKEEPERS_MAX: The maximum number of timekeepers managed
*/
enum timekeeper_ids {
TIMEKEEPER_CORE,
#ifdef CONFIG_POSIX_AUX_CLOCKS
TIMEKEEPER_AUX_FIRST,
TIMEKEEPER_AUX_LAST = TIMEKEEPER_AUX_FIRST + MAX_AUX_CLOCKS - 1,
#endif
TIMEKEEPERS_MAX,
};