Page MenuHomeFreeBSD

linuxkpi: Add bitfield.h
AbandonedPublic

Authored by manu on Oct 5 2020, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 5, 7:06 PM
Unknown Object (File)
Wed, Mar 5, 3:32 AM
Unknown Object (File)
Tue, Mar 4, 1:58 PM
Unknown Object (File)
Jan 26 2025, 9:37 AM
Unknown Object (File)
Jan 23 2025, 6:57 PM
Unknown Object (File)
Jan 9 2025, 6:13 AM
Unknown Object (File)
Nov 19 2024, 12:36 AM
Unknown Object (File)
Nov 4 2024, 8:59 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.