diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-12 11:15:28 -0500 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-02-08 08:41:03 -0500 |
| commit | 3c7a8e190bc580813ddd9259f62971c8d2a6b5ad (patch) | |
| tree | 09e2ec9478f5d3fec2fb4af45c1df92f457a72d8 /include/uapi/asm-generic | |
| parent | Merge tag 'v6.8-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/... (diff) | |
| download | linux-3c7a8e190bc580813ddd9259f62971c8d2a6b5ad.tar.gz linux-3c7a8e190bc580813ddd9259f62971c8d2a6b5ad.zip | |
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>
Diffstat (limited to 'include/uapi/asm-generic')
| -rw-r--r-- | include/uapi/asm-generic/bitsperlong.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/asm-generic/bitsperlong.h b/include/uapi/asm-generic/bitsperlong.h index 352cb81947b8..fadb3f857f28 100644 --- a/include/uapi/asm-generic/bitsperlong.h +++ b/include/uapi/asm-generic/bitsperlong.h @@ -24,4 +24,8 @@ #endif #endif +#ifndef __BITS_PER_LONG_LONG +#define __BITS_PER_LONG_LONG 64 +#endif + #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ |
