Re: [patch V2 12/26] timekeeping: Introduce auxiliary timekeepers

From: John Stultz
Date: Fri Jun 13 2025 - 22:41:55 EST


On Mon, May 19, 2025 at 1:33 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> From: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
>
> Provide timekeepers for auxiliary clocks and initialize them during
> boot.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> ---
> kernel/time/timekeeping.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
> ---
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -2630,3 +2640,11 @@ void hardpps(const struct timespec64 *ph
> }
> EXPORT_SYMBOL(hardpps);
> #endif /* CONFIG_NTP_PPS */
> +
> +#ifdef CONFIG_POSIX_AUX_CLOCKS
> +static __init void tk_aux_setup(void)
> +{
> + for (int i = TIMEKEEPER_AUX; i <= TIMEKEEPER_AUX_LAST; i++)

My only thought here, seeing its use, would it be better if
TIMEKEEPER_AUX was TIMEKEEPER_AUX_FIRST?

Acked-by: John Stultz <jstultz@xxxxxxxxxx>
thanks
-john