diff options
| author | Warner Losh <imp@FreeBSD.org> | 2026-01-16 21:16:42 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-01-16 21:20:20 +0000 |
| commit | 689663d4654fd3a98a78c66ed99f7ed51164c771 (patch) | |
| tree | ca2cdc434ab268aa3c795ebceee8529657e4f6a0 | |
| parent | c940f5c775dfe241e3e9a80fbf62286cdf44c0a0 (diff) | |
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: 108de784513d
Sponsored by: Netflix
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54746
| -rw-r--r-- | sys/kern/kern_time.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 5b7485c25cd7..0c16045ca610 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -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); |
