Page MenuHomeFreeBSD

linuxkpi: Add bitfield.h
AbandonedPublic

Authored by manu on Oct 5 2020, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 14 2024, 4:48 AM
Unknown Object (File)
Oct 12 2023, 5:08 AM
Unknown Object (File)
Jul 15 2023, 10:25 PM
Unknown Object (File)
Jun 26 2023, 11:24 PM
Unknown Object (File)
Jun 14 2023, 3:47 PM
Unknown Object (File)
Jan 12 2023, 10:55 AM
Unknown Object (File)
Jan 3 2023, 8:51 AM
Unknown Object (File)
Nov 28 2022, 4:11 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.