]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
uapi: introduce uapi-friendly macros for GENMASK
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Dec 2023 16:15:28 +0000 (11:15 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Feb 2024 13:41:03 +0000 (08:41 -0500)
commit3c7a8e190bc580813ddd9259f62971c8d2a6b5ad
tree09e2ec9478f5d3fec2fb4af45c1df92f457a72d8
parent047371968ffc470769f541d6933e262dc7085456
uapi: introduce uapi-friendly macros for GENMASK

Move __GENMASK and __GENMASK_ULL from include/ to include/uapi/ so that they can
be used to define masks in userspace API headers.  Compared to what is already
in include/linux/bits.h, the definitions need to use the uglified versions of
UL(), ULL(), BITS_PER_LONG and BITS_PER_LONG_LONG (which did not even exist),
but otherwise expand to the same content.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/linux/bits.h
include/uapi/asm-generic/bitsperlong.h
include/uapi/linux/bits.h [new file with mode: 0644]