Page MenuHomeFreeBSD

LinuxKPI: switch jiffies and timer->expire to unsigned long
ClosedPublic

Authored by bz on Sat, Jan 4, 1:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 13, 1:22 AM
Unknown Object (File)
Sun, Jan 12, 3:16 AM
Unknown Object (File)
Sat, Jan 11, 9:59 PM
Unknown Object (File)
Fri, Jan 10, 10:25 AM
Unknown Object (File)
Fri, Jan 10, 10:17 AM
Unknown Object (File)
Fri, Jan 10, 8:55 AM
Unknown Object (File)
Thu, Jan 9, 10:40 PM
Unknown Object (File)
Tue, Jan 7, 10:48 PM
Subscribers

Details

Summary

It seems these function in Linux work with unsigned long and not int.
Start simply replacing the int where I came across it while debugging
a wireless driver timer modification. Also sprinkle in some "const".

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Diff Detail

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

Event Timeline

bz requested review of this revision.Sat, Jan 4, 1:54 PM

OK

sys/compat/linuxkpi/common/include/linux/jiffies.h
72

Linux removed timespec_to_jiffies as of 2019, we can follow suit after checking that there are no users left (also jiffies_to_timespec)

This revision is now accepted and ready to land.Tue, Jan 7, 7:33 PM
sys/compat/linuxkpi/common/include/linux/jiffies.h
72

I see no jiffies_to_timespec

I also see no timespec_to_jiffies in drm-kmod 5.4-lts, 5.10-lts, 5.15-lts, and 6.1-lts.

I seem another #define in sys/dev/drm2/drm_os_freebsd.h which likely is also unused then and should probably just go as well? I'll put another review up for both and add Phabgroup(x11) to catch the graphics people better.

bz marked an inline comment as done.Tue, Jan 7, 7:42 PM