Page MenuHomeFreeBSD

LinuxKPI: A bitfield.h implementation.
ClosedPublic

Authored by bz on Oct 7 2020, 6:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 14 2024, 10:01 PM
Unknown Object (File)
Feb 14 2024, 1:23 PM
Unknown Object (File)
Jan 14 2024, 4:48 AM
Unknown Object (File)
Dec 25 2023, 12:20 PM
Unknown Object (File)
Dec 23 2023, 10:58 PM
Unknown Object (File)
Nov 2 2023, 11:42 AM
Unknown Object (File)
Nov 2 2023, 4:48 AM
Unknown Object (File)
Oct 29 2023, 2:22 AM

Details

Summary

This implementation was iteratively produced during the work
on various WiFi drivers from individual functions to macro-created
implementations for the various bit sized needed (and then extended
to more for comepleteness). Some of the bit combinations do not
seem to make sense so are left out.

The __bf_shf(x) was obtained from D26681 [1].

Requested by:  manu [1]
Sponsored by:  The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Oct 7 2020, 6:05 PM
sys/compat/linuxkpi/common/include/linux/pci.h
32 ↗(On Diff #77982)

Please ignore the pci.h changes; arc diff to the wrong branch. Sorry.

sys/compat/linuxkpi/common/include/linux/bitfield.h
40 ↗(On Diff #77982)

This returns the least significant bit. Should the function be called f_lsb() ?

sys/compat/linuxkpi/common/include/linux/bitfield.h
40 ↗(On Diff #77982)

I am all for better naming;
I think (it's been a few months) they originated from how the results were used (as a mask or as a multiplier and then also divisor).

  • Rename f_mul to ___lsb as suggested by hselasky.
bz marked an inline comment as done.Oct 7 2020, 8:43 PM
This revision is now accepted and ready to land.Oct 7 2020, 8:49 PM

manu, if you are okay with it, either commit it yourself or let me know when so that you can deal with the drm-kmod bits as well

In D26708#595281, @bz wrote:

manu, if you are okay with it, either commit it yourself or let me know when so that you can deal with the drm-kmod bits as well

Haven't tested but should be ok for drm-kmod on current as we have this files and we include from the gplv2 directory before.

This revision was automatically updated to reflect the committed changes.