Initialize CLOCK_UPTIME for itmer events

Since we move to implement Linux's CLOCK_MONOTONIC with CLOCK_UPTIME, we
broke the some timer support for Linux. Fix this by initializing
CLOCK_UPTIME as a posix clock so we can use in that context.

PR:			292496
MFC After:		5 days
Fixes: 			108de78451
Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D54746
This commit is contained in:
Warner Losh
2026-01-16 14:16:42 -07:00
parent c940f5c775
commit 689663d465
+1
View File
@@ -1183,6 +1183,7 @@ itimer_start(void *dummy __unused)
NULL, NULL, itimer_init, itimer_fini, UMA_ALIGN_PTR, 0);
register_posix_clock(CLOCK_REALTIME, &rt_clock);
register_posix_clock(CLOCK_MONOTONIC, &rt_clock);
register_posix_clock(CLOCK_UPTIME, &rt_clock);
register_posix_clock(CLOCK_TAI, &rt_clock);
p31b_setcfg(CTL_P1003_1B_TIMERS, 200112L);
p31b_setcfg(CTL_P1003_1B_DELAYTIMER_MAX, INT_MAX);