Page MenuHomeFreeBSD

linuxkpi: Move timer related functions in its own file.
AcceptedPublic

Authored by manu on Oct 9 2020, 9:29 PM.

Details

Reviewers
bz
Group Reviewers
linuxkpi
Summary

While here prefix the functions with lkpi_

No functional changes intended.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

manu requested review of this revision.Oct 9 2020, 9:29 PM
sys/compat/linuxkpi/common/src/linux_timer.c
2–4

It looks like the routines moved to this file are all from Mellanox changes in 2015 and on.
git diff 58cb7b5be4f9ad0244294ede8f942bb76b37ca6f:sys/ofed/include/linux/linux_compat.c HEAD:sys/compat/linuxkpi/common/src/linux_compat.c

sys/compat/linuxkpi/common/src/linux_timer.c
2–4

I'll admit that I've not looked in the history to find who it belong too.
I'll update the licence accordingly (and also add the new files to sys/conf/files).

bz added a subscriber: bz.

I haven't tried it but scrolling through it looks ok to me.

sys/compat/linuxkpi/common/src/linux_timer.c
50

does this actually belong into linux/gcd.h these days? (not sure if it is a public function or not possibly needed for anything else).
Maybe longer-term.

This revision is now accepted and ready to land.Oct 11 2020, 8:19 PM
sys/compat/linuxkpi/common/src/linux_timer.c
50

gcd.h only have unsigned long gcd(unsigned long a, unsigned long b) attribute_const;
This one is only used locally as we nned 64bits int for time calculation.