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)
Tue, Sep 23, 8:43 PM
Unknown Object (File)
Sun, Sep 21, 9:34 PM
Unknown Object (File)
Tue, Sep 16, 5:10 PM
Unknown Object (File)
Mon, Sep 15, 8:38 PM
Unknown Object (File)
Mon, Sep 15, 11:46 AM
Unknown Object (File)
Sun, Sep 14, 2:35 PM
Unknown Object (File)
Sat, Sep 13, 9:56 AM
Unknown Object (File)
Thu, Sep 4, 6: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.