[PATCH v3 0/4] timekeeping: Avoid some runtime conditionals around auxiliary clocks

From: Thomas Weißschuh (Schneider Electric)

Date: Mon Nov 30 2026 - 11:50:17 EST


Some of the conditionals around auxiliary timekeepers are known at
compile time but are currently checked at runtime.
Introduce and use some helpers to avoid the runtime overhead.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
---
Changes in v3:
- Rebase on current tip/timers/core.
- Improve the title of patch 3 a bit.
- Keep some more whitespace around the function definitions in patch 3.
- Link to v2: https://patch.msgid.link/20260908-timekeeping-conditionals-v2-0-5ebc3e7e1da0@xxxxxxxxxxxxx

Changes in v2:
- Rebase on v7.3-rc1.
- Link to v1: https://patch.msgid.link/20260812-timekeeping-conditionals-v1-0-75ebe366677d@xxxxxxxxxxxxx

---
Thomas Weißschuh (Schneider Electric) (4):
timekeeping: Move timekeeper_is_core_tk() up in the file
timekeeping: Use timekeeper_is_core_tk() in timekeeping_update_on_shadow()
timekeeping: Remove the unnecessary tk_is_aux()
timekeeping: Introduce and use timekeeper_is_clock_valid()

kernel/time/timekeeping.c | 39 ++++++++++++++++++---------------------
1 file changed, 18 insertions(+), 21 deletions(-)
---
base-commit: f21571ed8908094d4d1c15271487475e02864496
change-id: 20260701-timekeeping-conditionals-25e2d45d86d9

Best regards,
--
Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>