From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,yury.norov@gmail.com,linux@rasmusvillemoes.dk,arnd@arndb.de,anshuman.khandual@arm.com,akpm@linux-foundation.org
Subject: [merged] uapi-define-genmask_u128.patch removed from -mm tree
Date: Tue, 06 Aug 2024 14:00:25 -0700 [thread overview]
Message-ID: <20240806210026.44CACC32786@smtp.kernel.org> (raw)
The quilt patch titled
Subject: uapi: define GENMASK_U128
has been removed from the -mm tree. Its filename was
uapi-define-genmask_u128.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Anshuman Khandual <anshuman.khandual@arm.com>
Subject: uapi: define GENMASK_U128
Date: Thu, 25 Jul 2024 11:18:07 +0530
Patch series "uapi: Add support for GENMASK_U128()", v2.
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 patch (of 2):
This adds GENMASK_U128() and __GENMASK_U128() macros using __BITS_PER_U128
and __int128 data types. These macros will be used in providing support for
generating 128 bit masks.
Link: https://lkml.kernel.org/r/20240725054808.286708-1-anshuman.khandual@arm.com
Link: https://lkml.kernel.org/r/20240725054808.286708-2-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/bits.h | 2 ++
include/uapi/asm-generic/bitsperlong.h | 2 ++
include/uapi/linux/bits.h | 3 +++
include/uapi/linux/const.h | 1 +
4 files changed, 8 insertions(+)
--- a/include/linux/bits.h~uapi-define-genmask_u128
+++ a/include/linux/bits.h
@@ -35,5 +35,7 @@
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
#define GENMASK_ULL(h, l) \
(GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
+#define GENMASK_U128(h, l) \
+ (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
#endif /* __LINUX_BITS_H */
--- a/include/uapi/asm-generic/bitsperlong.h~uapi-define-genmask_u128
+++ a/include/uapi/asm-generic/bitsperlong.h
@@ -28,4 +28,6 @@
#define __BITS_PER_LONG_LONG 64
#endif
+#define __BITS_PER_U128 128
+
#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
--- a/include/uapi/linux/bits.h~uapi-define-genmask_u128
+++ a/include/uapi/linux/bits.h
@@ -12,4 +12,7 @@
(((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
(~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
+#define __GENMASK_U128(h, l) \
+ ((_BIT128((h) + 1)) - (_BIT128(l)))
+
#endif /* _UAPI_LINUX_BITS_H */
--- a/include/uapi/linux/const.h~uapi-define-genmask_u128
+++ a/include/uapi/linux/const.h
@@ -27,6 +27,7 @@
#define _BITUL(x) (_UL(1) << (x))
#define _BITULL(x) (_ULL(1) << (x))
+#define _BIT128(x) ((unsigned __int128)(1) << (x))
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
_
Patches currently in -mm which might be from anshuman.khandual@arm.com are
lib-test_bitsc-add-tests-for-genmask_u128.patch
reply other threads:[~2024-08-06 21:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240806210026.44CACC32786@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=arnd@arndb.de \
--cc=linux@rasmusvillemoes.dk \
--cc=mm-commits@vger.kernel.org \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.