Page MenuHomeFreeBSD

linuxkpi: Add `timer64_to_tm()`
ClosedPublic

Authored by dumbbell on Aug 10 2026, 5:27 PM.
Referenced Files
F174549974: D58758.id186169.diff
Sun, Oct 4, 2:36 AM
F174544084: D58758.id186175.diff
Sun, Oct 4, 1:42 AM
Unknown Object (File)
Sat, Oct 3, 1:00 PM
Unknown Object (File)
Sat, Oct 3, 3:49 AM
Unknown Object (File)
Fri, Oct 2, 5:48 PM
Unknown Object (File)
Thu, Oct 1, 5:23 PM
Unknown Object (File)
Wed, Sep 30, 9:23 AM
Unknown Object (File)
Wed, Sep 30, 5:25 AM
Subscribers

Details

Summary

The function converts a number of seconds since Epoch to a struct tm.

The implementation was copied from contrib/tzcode/localtime.c.

The amdgpu DRM driver started to use it in Linux 6.15.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

bz added inline comments.
sys/compat/linuxkpi/common/src/linux_time.c
11 ↗(On Diff #183793)

Which is public domain. What does that make this file then?

Fix new file license as suggested by @bz.

dumbbell added inline comments.
sys/compat/linuxkpi/common/src/linux_time.c
11 ↗(On Diff #183793)

I renamed the file to suggest that it only contains timesub() and I fixed the license header. Does this match what you had in mind?

I assume the copied file contents and logic are fine, so I haven't reviewed those.

This revision is now accepted and ready to land.Mon, Sep 7, 7:41 PM
This revision was automatically updated to reflect the committed changes.
dumbbell marked an inline comment as done.