Page MenuHomeFreeBSD

linuxkpi: Add `hrtimer_setup()`
ClosedPublic

Authored by dumbbell on Mon, Aug 10, 5:26 PM.
Referenced Files
Unknown Object (File)
Mon, Sep 7, 9:20 AM
Unknown Object (File)
Sun, Sep 6, 3:55 PM
Unknown Object (File)
Tue, Sep 1, 10:25 PM
Unknown Object (File)
Tue, Sep 1, 7:23 AM
Unknown Object (File)
Tue, Sep 1, 3:18 AM
Unknown Object (File)
Tue, Sep 1, 12:57 AM
Unknown Object (File)
Fri, Aug 28, 10:20 PM
Unknown Object (File)
Wed, Aug 26, 12:36 PM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.

76

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.