Page MenuHomeFreeBSD

linuxkpi: Add `hrtimer_setup()`
ClosedPublic

Authored by dumbbell on Aug 10 2026, 5:26 PM.
Referenced Files
F174869472: D58757.diff
Tue, Oct 6, 4:15 PM
F174857125: D58757.id186174.diff
Tue, Oct 6, 2:09 PM
F174855200: D58757.diff
Tue, Oct 6, 1:46 PM
F174832845: D58757.id186167.diff
Tue, Oct 6, 8:13 AM
Unknown Object (File)
Mon, Oct 5, 10:25 AM
Unknown Object (File)
Mon, Oct 5, 4:40 AM
Unknown Object (File)
Mon, Oct 5, 2:33 AM
Unknown Object (File)
Sun, Oct 4, 1:05 AM
Subscribers

Details

Summary

hrtimer_setup() replaces hrtimer_init() in Linux 6.15. The API and the role are the same, except:

  • it takes the function callback as argument
  • if function is NULL, it assigns a default callback

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dumbbell edited the summary of this revision. (Show Details)
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/hrtimer.h
58

Does that mean this is LINUXKPI_VERSION < 61500? We should probably start hiding this (in a separate pass) to not run into similar problems as we did with, e.g., https://reviews.freebsd.org/D58834, carrying old stuff around endlessly.

67

I know it's weird given everything in here is linux_, but can we call new stuff linuxkpi_ and no longer linux_ ?

sys/compat/linuxkpi/common/src/linux_hrtimer.c
108

This is actually exposed on Linux (probably shouldn't have been there either). Want to call it linuxkpi_hrtimer_dummy_timeout so we could make it public in the future and document that it is a public KPI?

dumbbell marked 3 inline comments as done.

Fix build failure

bz added inline comments.
sys/compat/linuxkpi/common/src/linux_hrtimer.c
109

__unused but I am fine even without it of if you just add ti before commit.

This revision is now accepted and ready to land.Mon, Sep 7, 7:44 PM

Add __unused after unused arguent in linuxkpi_hrtimer_dummy_timeout() as suggested by @bz.

This revision now requires review to proceed.Mon, Sep 7, 8:29 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Sep 7, 8:33 PM
This revision was automatically updated to reflect the committed changes.