Re: [PATCH v2 1/2] include: linux: Import hw_bitfield.h from Linux v6.18
Quentin Schulz <[email protected]>
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <5af6d8cb-64cd-43be-ab99-3a8daaaf7ca7__1140.15794112987$1786090570$gmane$org@cherry.de> |
Hi Jonas,
On 8/3/26 8:43 PM, Jonas Karlman wrote:
> Hardware of various vendors, but very notably Rockchip, often uses
> 32-bit registers where the upper 16-bit half of the register is a
> write-enable mask for the lower half.
>
> Add hw_bitfield.h with two macros: FIELD_PREP_WM16, and
> FIELD_PREP_WM16_CONST. The latter is a version that can be used in
> initializers, like FIELD_PREP_CONST.
>
> Import hw_bitfield.h from Linux commit 21368fcbb124 ("bitmap: introduce
> hardware-specific bitfield operations"), first introduced in v6.18-rc1.
>
> This contains two changes compared to the Linux version:
> - include of linux/limit.h was dropped
> - use of const_true() in FIELD_PREP_WM16_CONST() was dropped
>
Acked-by: Quentin Schulz <[email protected]>
The content in this patch is as described in the commit log.
I'm wondering whether we should try to get include/linux/limit.h (and
include/vdso/limit.h) in. Also wondering if we could also get
const_true() in somehow.
No changes made to this file in Linux kernel since v6.18-rc1, so could
as well have said it's taken from 7.2-rc6 (which also means no missed
fixes).
I'll wait on Tom's Reviewed-by before merging this though since it's not
a straight import from the Linux kernel. I'm targeting the next branch
for this.
Cheers,
Quentin