Page MenuHomeFreeBSD

linuxkpi: Add bitfield.h
AbandonedPublic

Authored by manu on Oct 5 2020, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 23, 6:57 PM
Unknown Object (File)
Thu, Jan 9, 6:13 AM
Unknown Object (File)
Nov 19 2024, 12:36 AM
Unknown Object (File)
Nov 4 2024, 8:59 PM
Unknown Object (File)
Oct 5 2024, 12:56 PM
Unknown Object (File)
Oct 5 2024, 12:56 PM
Unknown Object (File)
Oct 5 2024, 12:35 PM
Unknown Object (File)
Aug 17 2024, 10:30 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

Import bitfield.h from OpenBSD.

This defines bf_shf which is a wrapper for builting_ffsll and
FIELD_GET which apply a mask to a given value.

Sponsored-by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

manu requested review of this revision.Oct 5 2020, 1:44 PM

Can I ask you to drop this one?

I don't know why I missed it (or why it didn't conflict).
I probably missed more overlap then when I tried to narrow don't to compile-time conflicts.

I have this one: https://people.freebsd.org/~bz/tmp/bitfield.h ; happy to put up into review as I haven't touched it since July.

In D26681#594661, @bz wrote:

Can I ask you to drop this one?

I don't know why I missed it (or why it didn't conflict).
I probably missed more overlap then when I tried to narrow don't to compile-time conflicts.

I have this one: https://people.freebsd.org/~bz/tmp/bitfield.h ; happy to put up into review as I haven't touched it since July.

It doesn't conflict because drm-kmod uses include from drm-kmod first so if the macros/inline are in the same file in both drm-kmod or base you don't have any problem.
I need the __bf_shf, so please add it in yours and put it in review.

In D26681#594681, @manu wrote:

I need the __bf_shf, so please add it in yours and put it in review.

Done in https://reviews.freebsd.org/D26708

bz@ commited his more complete version.