Page MenuHomeFreeBSD

LinuxKPI: add ktime_get_boottime_seconds()
ClosedPublic

Authored by bz on Apr 24 2025, 2:21 PM.
Tags
None
Referenced Files
F152980064: D50005.id154223.diff
Sat, Apr 18, 11:11 AM
Unknown Object (File)
Wed, Apr 15, 9:13 PM
Unknown Object (File)
Wed, Apr 15, 5:35 AM
Unknown Object (File)
Sat, Apr 11, 11:25 PM
Unknown Object (File)
Tue, Apr 7, 12:27 AM
Unknown Object (File)
Sat, Mar 28, 11:56 AM
Unknown Object (File)
Wed, Mar 25, 12:52 AM
Unknown Object (File)
Tue, Mar 24, 4:33 PM

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.