Page MenuHomeFreeBSD

LinuxKPI: add ktime_get_boottime_seconds()
ClosedPublic

Authored by bz on Apr 24 2025, 2:21 PM.
Tags
None
Referenced Files
F136732663: D50005.id154223.diff
Wed, Nov 19, 3:18 AM
F136619836: D50005.id154223.diff
Tue, Nov 18, 3:02 PM
Unknown Object (File)
Sat, Nov 1, 4:10 AM
Unknown Object (File)
Wed, Oct 29, 1:13 PM
Unknown Object (File)
Wed, Oct 29, 12:59 PM
Unknown Object (File)
Wed, Oct 29, 12:59 PM
Unknown Object (File)
Wed, Oct 29, 12:58 PM
Unknown Object (File)
Wed, Oct 29, 11:31 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.