Page MenuHomeFreeBSD

linuxkpi: Add bitfield.h
AbandonedPublic

Authored by manu on Oct 5 2020, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 7, 2:33 AM
Unknown Object (File)
Wed, Jul 2, 5:07 PM
Unknown Object (File)
Wed, Jul 2, 4:50 AM
Unknown Object (File)
Mon, Jun 30, 5:03 PM
Unknown Object (File)
Sun, Jun 29, 8:50 PM
Unknown Object (File)
Mar 5 2025, 7:06 PM
Unknown Object (File)
Mar 5 2025, 3:32 AM
Unknown Object (File)
Mar 4 2025, 1:58 PM
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.