Page MenuHomeFreeBSD

LinuxKPI: add ktime_get_boottime_seconds()
ClosedPublic

Authored by bz on Apr 24 2025, 2:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 11, 7:20 PM
Unknown Object (File)
Mon, May 11, 7:19 PM
Unknown Object (File)
Mon, May 11, 7:11 PM
Unknown Object (File)
Wed, Apr 29, 6:43 AM
Unknown Object (File)
Wed, Apr 29, 12:20 AM
Unknown Object (File)
Mon, Apr 27, 12:10 PM
Unknown Object (File)
Sat, Apr 25, 7:05 PM
Unknown Object (File)
Sun, Apr 19, 8:33 AM

Details

Summary

ktime_get_boottime_seconds() is needed by an updated iwlwifi driver.

Sposored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

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

Event Timeline

bz requested review of this revision.Apr 24 2025, 2:21 PM
dumbbell added a subscriber: dumbbell.

This looks good to me.

The part that confused me is the name and implementation of ktime_divns(): I wonder if ktime_divns() should "convert" its ktime_t argument to nanoseconds first with ktime_to_ns(). It would be a no-op but just to clarify that it works with and returns nanoseconds, even though the argument is a ktime_t.

This revision is now accepted and ready to land.May 8 2025, 9:42 AM

This looks good to me.

The part that confused me is the name and implementation of ktime_divns(): I wonder if ktime_divns() should "convert" its ktime_t argument to nanoseconds first with ktime_to_ns(). It would be a no-op but just to clarify that it works with and returns nanoseconds, even though the argument is a ktime_t.

Yes, ktime_t == ns seems to be implied. There's a few type mis-matches in the file I think but that's unrelated to this change. I wonder if we should do a pass and fix some of them but I'd rather let other things settle first a bit.

This revision was automatically updated to reflect the committed changes.