Skip to content

uapi: Add support for GENMASK_U128()

Anshuman Khandual linux-arch lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 10 repliesSuperseded
  3. v22 patches 11 repliesApplied 2/2
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches7 repliesSuperseded

Changes in v4 from the cover letter

- Folded in the below patch which guards against assembly code
- Fixed __GENMASK_U128() for the corner case (128 bit left shift)
- Improved genmask_u128_test() and genmask_input_check_test()

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2uapi: Define GENMASK_U128include/linux/bits.h include/uapi/linux/bits.h include/uapi/linux/const.h+35 -00 replies
2/2lib/test_bits.c: Add tests for GENMASK_U128()lib/test_bits.c+34 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchArnd Bergmann
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH V4 0/2] uapi: Add support for GENMASK_U128()

This adds support for GENMASK_U128() and some corresponding tests as well. GENMASK_U128() generated 128 bit masks will be required later on the arm64 platform for enabling FEAT_SYSREG128 and FEAT_D128 features.

Because GENMAKS_U128() depends on __int128 data type being supported in the compiler, its usage needs to be protected with CONFIG_ARCH_SUPPORTS_INT128.

This series is being used for an work in progress on arm64 platform.

https://lore.kernel.org/all/[email protected]/

Cc Andrew Morton <[email protected]>
Cc Yury Norov <[email protected]>
Cc Rasmus Villemoes <[email protected]>
Cc Arnd Bergmann <[email protected]>>

Changes in V4:

- Folded in the below patch which guards against assembly code
- Fixed __GENMASK_U128() for the corner case (128 bit left shift)
- Improved genmask_u128_test() and genmask_input_check_test()

https://lore.kernel.org/lkml/[email protected]/

Changes in V3:

https://lore.kernel.org/lkml/[email protected]/

- Dropped unused __BITS_PER_U128
- Moved #ifdef CONFIG_ARCH_SUPPORTS_INT128 inside genmask_u128_test()
- Added asm unsupported comments for GENMASK_U128() and __BIT128()
- Added reviewed tag from Arnd

Changes in V2:

https://lore.kernel.org/all/[email protected]/

- Wrapped genmask_u128_test() with CONFIG_ARCH_SUPPORTS_INT128
- Defined __BITS_PER_U128 unconditionally as 128
- Defined __GENMASK_U128() via new _BIT128()
- Dropped _U128() and _AC128()

Changes in V1:

https://lore.kernel.org/lkml/[email protected]/

Anshuman Khandual (2):
uapi: Define GENMASK_U128
lib/test_bits.c: Add tests for GENMASK_U128()

 include/linux/bits.h       | 15 +++++++++++++++
 include/uapi/linux/bits.h  |  3 +++
 include/uapi/linux/const.h | 17 +++++++++++++++++
 lib/test_bits.c            | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
Signature · 1 line
2.30.2