Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] uapi: Add support for GENMASK_U128()
@ 2024-07-24 10:31 Anshuman Khandual
  2024-07-24 10:31 ` [PATCH 1/2] uapi: Define GENMASK_U128 Anshuman Khandual
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-24 10:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: anshuman.khandual, Andrew Morton, Yury Norov, Rasmus Villemoes,
	Arnd Bergmann, linux-arch

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.

Question:

Proposed GENMASK_U128() depends on __int128 data type being supported in
the compiler. Just wondering if that requires some compiler version #ifdefs
or something similar ?

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Arnd Bergmann <arnd@arndb.de>>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org

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

 include/linux/bits.h                   |  2 ++
 include/uapi/asm-generic/bitsperlong.h |  4 ++++
 include/uapi/linux/bits.h              |  4 ++++
 include/uapi/linux/const.h             |  3 +++
 lib/test_bits.c                        | 21 +++++++++++++++++++++
 5 files changed, 34 insertions(+)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] uapi: Define GENMASK_U128
  2024-07-24 10:31 [PATCH 0/2] uapi: Add support for GENMASK_U128() Anshuman Khandual
@ 2024-07-24 10:31 ` Anshuman Khandual
  2024-07-24 11:03   ` Arnd Bergmann
  2024-07-24 10:31 ` [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128() Anshuman Khandual
  2024-07-24 10:33 ` [PATCH 0/2] uapi: Add support " Ard Biesheuvel
  2 siblings, 1 reply; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-24 10:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: anshuman.khandual, Andrew Morton, Yury Norov, Rasmus Villemoes,
	Arnd Bergmann, linux-arch

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.

Cc: Yury Norov <yury.norov@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Arnd Bergmann <arnd@arndb.de>>
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 include/linux/bits.h                   | 2 ++
 include/uapi/asm-generic/bitsperlong.h | 4 ++++
 include/uapi/linux/bits.h              | 4 ++++
 include/uapi/linux/const.h             | 3 +++
 4 files changed, 13 insertions(+)

diff --git a/include/linux/bits.h b/include/linux/bits.h
index 0eb24d21aac2..0a174cce09d2 100644
--- a/include/linux/bits.h
+++ b/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 */
diff --git a/include/uapi/asm-generic/bitsperlong.h b/include/uapi/asm-generic/bitsperlong.h
index fadb3f857f28..a2c425455b2f 100644
--- a/include/uapi/asm-generic/bitsperlong.h
+++ b/include/uapi/asm-generic/bitsperlong.h
@@ -28,4 +28,8 @@
 #define __BITS_PER_LONG_LONG 64
 #endif
 
+#ifndef __BITS_PER_U128
+#define __BITS_PER_U128 128
+#endif
+
 #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/uapi/linux/bits.h b/include/uapi/linux/bits.h
index 3c2a101986a3..780cf99b8e6e 100644
--- a/include/uapi/linux/bits.h
+++ b/include/uapi/linux/bits.h
@@ -12,4 +12,8 @@
         (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
          (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
 
+#define __GENMASK_U128(h, l) \
+	(((~_U128(0)) - (_U128(1) << (l)) + 1) & \
+	 (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
+
 #endif /* _UAPI_LINUX_BITS_H */
diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h
index a429381e7ca5..e7d9189e6630 100644
--- a/include/uapi/linux/const.h
+++ b/include/uapi/linux/const.h
@@ -16,14 +16,17 @@
 #ifdef __ASSEMBLY__
 #define _AC(X,Y)	X
 #define _AT(T,X)	X
+#define _AC128(X)	X
 #else
 #define __AC(X,Y)	(X##Y)
 #define _AC(X,Y)	__AC(X,Y)
 #define _AT(T,X)	((T)(X))
+#define _AC128(X)	((unsigned __int128)(X))
 #endif
 
 #define _UL(x)		(_AC(x, UL))
 #define _ULL(x)		(_AC(x, ULL))
+#define _U128(x)	(_AC128(x))
 
 #define _BITUL(x)	(_UL(1) << (x))
 #define _BITULL(x)	(_ULL(1) << (x))
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
  2024-07-24 10:31 [PATCH 0/2] uapi: Add support for GENMASK_U128() Anshuman Khandual
  2024-07-24 10:31 ` [PATCH 1/2] uapi: Define GENMASK_U128 Anshuman Khandual
@ 2024-07-24 10:31 ` Anshuman Khandual
  2024-07-24 10:45   ` Arnd Bergmann
  2024-07-25  1:04   ` kernel test robot
  2024-07-24 10:33 ` [PATCH 0/2] uapi: Add support " Ard Biesheuvel
  2 siblings, 2 replies; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-24 10:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: anshuman.khandual, Andrew Morton, Yury Norov, Rasmus Villemoes,
	Arnd Bergmann, linux-arch

This adds GENMASK_U128() tests although currently only 64 bit wide masks
are being tested.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 lib/test_bits.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/lib/test_bits.c b/lib/test_bits.c
index 01313980f175..2515ddc34409 100644
--- a/lib/test_bits.c
+++ b/lib/test_bits.c
@@ -39,6 +39,24 @@ static void genmask_ull_test(struct kunit *test)
 #endif
 }
 
+static void genmask_u128_test(struct kunit *test)
+{
+	/* Tests mask generation only when the mask width is within 64 bits */
+	KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
+	KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
+	KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
+	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
+	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(64, 0) >> 1);
+	KUNIT_EXPECT_EQ(test, 0x00000000ffffffffULL, GENMASK_U128(81, 50) >> 50);
+
+#ifdef TEST_GENMASK_FAILURES
+	/* these should fail compilation */
+	GENMASK_U128(0, 1);
+	GENMASK_U128(0, 10);
+	GENMASK_U128(9, 10);
+#endif
+}
+
 static void genmask_input_check_test(struct kunit *test)
 {
 	unsigned int x, y;
@@ -56,12 +74,15 @@ static void genmask_input_check_test(struct kunit *test)
 	/* Valid input */
 	KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(1, 1));
 	KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(39, 21));
+	KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(100, 80));
+	KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(110, 65));
 }
 
 
 static struct kunit_case bits_test_cases[] = {
 	KUNIT_CASE(genmask_test),
 	KUNIT_CASE(genmask_ull_test),
+	KUNIT_CASE(genmask_u128_test),
 	KUNIT_CASE(genmask_input_check_test),
 	{}
 };
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/2] uapi: Add support for GENMASK_U128()
  2024-07-24 10:31 [PATCH 0/2] uapi: Add support for GENMASK_U128() Anshuman Khandual
  2024-07-24 10:31 ` [PATCH 1/2] uapi: Define GENMASK_U128 Anshuman Khandual
  2024-07-24 10:31 ` [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128() Anshuman Khandual
@ 2024-07-24 10:33 ` Ard Biesheuvel
  2 siblings, 0 replies; 11+ messages in thread
From: Ard Biesheuvel @ 2024-07-24 10:33 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-kernel, Andrew Morton, Yury Norov, Rasmus Villemoes,
	Arnd Bergmann, linux-arch

Hi Anshuman,

On Wed, 24 Jul 2024 at 12:31, Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> 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.
>
> Question:
>
> Proposed GENMASK_U128() depends on __int128 data type being supported in
> the compiler. Just wondering if that requires some compiler version #ifdefs
> or something similar ?
>

CONFIG_ARCH_SUPPORTS_INT128 comes to mind

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
  2024-07-24 10:31 ` [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128() Anshuman Khandual
@ 2024-07-24 10:45   ` Arnd Bergmann
  2024-07-24 12:00     ` Anshuman Khandual
  2024-07-25  1:04   ` kernel test robot
  1 sibling, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2024-07-24 10:45 UTC (permalink / raw)
  To: Anshuman Khandual, linux-kernel
  Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Linux-Arch

On Wed, Jul 24, 2024, at 12:31, Anshuman Khandual wrote:
> This adds GENMASK_U128() tests although currently only 64 bit wide masks
> are being tested.
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
>  lib/test_bits.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/lib/test_bits.c b/lib/test_bits.c
> index 01313980f175..2515ddc34409 100644
> --- a/lib/test_bits.c
> +++ b/lib/test_bits.c
> @@ -39,6 +39,24 @@ static void genmask_ull_test(struct kunit *test)
>  #endif
>  }
> 
> +static void genmask_u128_test(struct kunit *test)
> +{
> +	/* Tests mask generation only when the mask width is within 64 bits */
> +	KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
> +	KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
> +	KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));

This looks like it would need an #ifdef check for either
__SIZEOF_INT128__ or CONFIG_ARCH_SUPPORTS_INT128, otherwise
it will fail to build on all 32-bit architectures and possibly
old compiler versions on some 64-bit ones. I think I checked
in the past which targets support __u128, but I don't remember
the result.

    Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] uapi: Define GENMASK_U128
  2024-07-24 10:31 ` [PATCH 1/2] uapi: Define GENMASK_U128 Anshuman Khandual
@ 2024-07-24 11:03   ` Arnd Bergmann
  2024-07-24 11:59     ` Anshuman Khandual
  0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2024-07-24 11:03 UTC (permalink / raw)
  To: Anshuman Khandual, linux-kernel
  Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Linux-Arch

On Wed, Jul 24, 2024, at 12:31, Anshuman Khandual wrote:
> --- a/include/uapi/asm-generic/bitsperlong.h
> +++ b/include/uapi/asm-generic/bitsperlong.h
> @@ -28,4 +28,8 @@
>  #define __BITS_PER_LONG_LONG 64
>  #endif
> 
> +#ifndef __BITS_PER_U128
> +#define __BITS_PER_U128 128
> +#endif

I would hope we don't need this definition. Not that it
hurts at all, but __BITS_PER_LONG_LONG was already kind
of pointless since we don't run on anything else and
__BITS_PER_U128 clearly can't have any other sensible
definition than a plain 128.

>  #define __AC(X,Y)	(X##Y)
>  #define _AC(X,Y)	__AC(X,Y)
>  #define _AT(T,X)	((T)(X))
> +#define _AC128(X)	((unsigned __int128)(X))

I just tried using this syntax and it doesn't seem to do
what you expected. gcc silently truncates the constant
to a 64-bit value here, while clang fails the build.
See also https://godbolt.org/z/rzEqra7nY
https://stackoverflow.com/questions/63328802/unsigned-int128-literal-gcc

The __GENMASK_U128() macro however seems to work correctly
since you start out with a smaller number and then shift
it after the type conversion.

     Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] uapi: Define GENMASK_U128
  2024-07-24 11:03   ` Arnd Bergmann
@ 2024-07-24 11:59     ` Anshuman Khandual
  2024-07-24 12:37       ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-24 11:59 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Linux-Arch



On 7/24/24 16:33, Arnd Bergmann wrote:
> On Wed, Jul 24, 2024, at 12:31, Anshuman Khandual wrote:
>> --- a/include/uapi/asm-generic/bitsperlong.h
>> +++ b/include/uapi/asm-generic/bitsperlong.h
>> @@ -28,4 +28,8 @@
>>  #define __BITS_PER_LONG_LONG 64
>>  #endif
>>
>> +#ifndef __BITS_PER_U128
>> +#define __BITS_PER_U128 128
>> +#endif
> 
> I would hope we don't need this definition. Not that it
> hurts at all, but __BITS_PER_LONG_LONG was already kind
> of pointless since we don't run on anything else and
> __BITS_PER_U128 clearly can't have any other sensible
> definition than a plain 128.

Agreed, although this just followed __BITS_PER_LONG_LONG.
But sure __BITS_PER_U128 can be plain 128.

So would you like to have #ifndef __BITS_PER_LONG_LONG dropped here 
as well ? But should that be folded or in a separate patch ?

> 
>>  #define __AC(X,Y)	(X##Y)
>>  #define _AC(X,Y)	__AC(X,Y)
>>  #define _AT(T,X)	((T)(X))
>> +#define _AC128(X)	((unsigned __int128)(X))
> 
> I just tried using this syntax and it doesn't seem to do
> what you expected. gcc silently truncates the constant

But numbers passed into _AC128() are smaller in the range [128..0].
Hence the truncation might not be problematic in this context ? OR
could it be ?

> to a 64-bit value here, while clang fails the build.

Should this be disabled for CC_IS_CLANG ?

> See also https://godbolt.org/z/rzEqra7nY
> https://stackoverflow.com/questions/63328802/unsigned-int128-literal-gcc

So unless the value in there is beyond 64 bits, it should be good ?
OR am I missing something.

> 
> The __GENMASK_U128() macro however seems to work correctly
> since you start out with a smaller number and then shift
> it after the type conversion.

_U128() never receives anything beyond [127..0] range. So then this
should be good ?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
  2024-07-24 10:45   ` Arnd Bergmann
@ 2024-07-24 12:00     ` Anshuman Khandual
  0 siblings, 0 replies; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-24 12:00 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Linux-Arch



On 7/24/24 16:15, Arnd Bergmann wrote:
> On Wed, Jul 24, 2024, at 12:31, Anshuman Khandual wrote:
>> This adds GENMASK_U128() tests although currently only 64 bit wide masks
>> are being tested.
>>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>> ---
>>  lib/test_bits.c | 21 +++++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>
>> diff --git a/lib/test_bits.c b/lib/test_bits.c
>> index 01313980f175..2515ddc34409 100644
>> --- a/lib/test_bits.c
>> +++ b/lib/test_bits.c
>> @@ -39,6 +39,24 @@ static void genmask_ull_test(struct kunit *test)
>>  #endif
>>  }
>>
>> +static void genmask_u128_test(struct kunit *test)
>> +{
>> +	/* Tests mask generation only when the mask width is within 64 bits */
>> +	KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
>> +	KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
>> +	KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
> 
> This looks like it would need an #ifdef check for either
> __SIZEOF_INT128__ or CONFIG_ARCH_SUPPORTS_INT128, otherwise
> it will fail to build on all 32-bit architectures and possibly
> old compiler versions on some 64-bit ones. I think I checked
> in the past which targets support __u128, but I don't remember
> the result.

Sure, will go with CONFIG_ARCH_SUPPORTS_INT128 and add required #ifdefs here.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] uapi: Define GENMASK_U128
  2024-07-24 11:59     ` Anshuman Khandual
@ 2024-07-24 12:37       ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2024-07-24 12:37 UTC (permalink / raw)
  To: Anshuman Khandual, linux-kernel
  Cc: Andrew Morton, Yury Norov, Rasmus Villemoes, Linux-Arch

On Wed, Jul 24, 2024, at 13:59, Anshuman Khandual wrote:
> On 7/24/24 16:33, Arnd Bergmann wrote:
>> I would hope we don't need this definition. Not that it
>> hurts at all, but __BITS_PER_LONG_LONG was already kind
>> of pointless since we don't run on anything else and
>> __BITS_PER_U128 clearly can't have any other sensible
>> definition than a plain 128.
>
> Agreed, although this just followed __BITS_PER_LONG_LONG.
> But sure __BITS_PER_U128 can be plain 128.
>
> So would you like to have #ifndef __BITS_PER_LONG_LONG dropped here 
> as well ? But should that be folded or in a separate patch ?

A separate patch is probably better, but you can also
just leave it.

>>>  #define __AC(X,Y)	(X##Y)
>>>  #define _AC(X,Y)	__AC(X,Y)
>>>  #define _AT(T,X)	((T)(X))
>>> +#define _AC128(X)	((unsigned __int128)(X))
>> 
>> I just tried using this syntax and it doesn't seem to do
>> what you expected. gcc silently truncates the constant
>
> But numbers passed into _AC128() are smaller in the range [128..0].
> Hence the truncation might not be problematic in this context ? OR
> could it be ?
>
>> to a 64-bit value here, while clang fails the build.
>
> Should this be disabled for CC_IS_CLANG ?
>
>> See also https://godbolt.org/z/rzEqra7nY
>> https://stackoverflow.com/questions/63328802/unsigned-int128-literal-gcc
>
> So unless the value in there is beyond 64 bits, it should be good ?
> OR am I missing something.
>
>> The __GENMASK_U128() macro however seems to work correctly
>> since you start out with a smaller number and then shift
>> it after the type conversion.
>
> _U128() never receives anything beyond [127..0] range. So then this
> should be good ?

Since you define _U128() right next to _ULL(), I would argue
that it should have the corresponding behavior for any value
that can fit into the type. Since that is currently not
possible with gcc, I would prefer to not define it at all.

However, I think you can just define a _BIT128() macro
that behaves the same way as _BITULL() and define
__GENMASK_U128() based on that. Maybe something like

#define _BIT128(x) ((unsigned __int128)1 << (x))
#define __GENMASK_U128(h, l) (_BIT128((h) + 1)) - (_BIT128(l))

     Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
  2024-07-24 10:31 ` [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128() Anshuman Khandual
  2024-07-24 10:45   ` Arnd Bergmann
@ 2024-07-25  1:04   ` kernel test robot
  2024-07-25  4:19     ` Anshuman Khandual
  1 sibling, 1 reply; 11+ messages in thread
From: kernel test robot @ 2024-07-25  1:04 UTC (permalink / raw)
  To: Anshuman Khandual, linux-kernel
  Cc: oe-kbuild-all, anshuman.khandual, Andrew Morton,
	Linux Memory Management List, Yury Norov, Rasmus Villemoes,
	Arnd Bergmann, linux-arch

Hi Anshuman,

kernel test robot noticed the following build errors:

[auto build test ERROR on arnd-asm-generic/master]
[also build test ERROR on akpm-mm/mm-nonmm-unstable akpm-mm/mm-everything linus/master v6.10 next-20240724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/uapi-Define-GENMASK_U128/20240724-184809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link:    https://lore.kernel.org/r/20240724103142.165693-3-anshuman.khandual%40arm.com
patch subject: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
config: m68k-sun3x_defconfig (https://download.01.org/0day-ci/archive/20240725/202407250853.f3pSzob6-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407250853.f3pSzob6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407250853.f3pSzob6-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from lib/test_bits.c:6:
   lib/test_bits.c: In function 'genmask_u128_test':
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/bits.h:16:35: warning: left shift count >= width of type [-Wshift-count-overflow]
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                                   ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/bits.h:17:21: warning: right shift count >= width of type [-Wshift-count-overflow]
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |                     ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                      ^~~~~~~~~~~~
   lib/test_bits.c:45:75: warning: right shift count >= width of type [-Wshift-count-overflow]
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |                                                                           ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
         |         ^~~~~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/bits.h:16:35: warning: left shift count >= width of type [-Wshift-count-overflow]
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                                   ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/bits.h:17:21: warning: right shift count >= width of type [-Wshift-count-overflow]
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |                     ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:46:54: note: in expansion of macro 'GENMASK_U128'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                      ^~~~~~~~~~~~
   lib/test_bits.c:46:75: warning: right shift count >= width of type [-Wshift-count-overflow]
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |                                                                           ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:46:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      46 |         KUNIT_EXPECT_EQ(test, 0x0000000000ffffffULL, GENMASK_U128(87, 64) >> 64);
         |         ^~~~~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/bits.h:17:21: warning: right shift count >= width of type [-Wshift-count-overflow]
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |                     ^~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:47:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |         ^~~~~~~~~~~~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:47:54: note: in expansion of macro 'GENMASK_U128'
      47 |         KUNIT_EXPECT_EQ(test, 0x0000000000000001ULL, GENMASK_U128(0, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:48:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:48:54: note: in expansion of macro 'GENMASK_U128'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |                                                      ^~~~~~~~~~~~
>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:48:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |                          ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:48:54: note: in expansion of macro 'GENMASK_U128'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                      ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:48:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:17:12: note: in expansion of macro '_U128'
      17 |          (~_U128(0) >> (__BITS_PER_U128 - 1 - (h))))
         |            ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:48:54: note: in expansion of macro 'GENMASK_U128'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:48:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
         |             ^~~~~
   include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
      39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
         |                                      ^~~~~~~~~~~~~~
   lib/test_bits.c:48:54: note: in expansion of macro 'GENMASK_U128'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |                                                      ^~~~~~~~~~~~
   include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
      24 | #define _AC128(X)       ((unsigned __int128)(X))
         |                                    ^~~~~~~~
   include/kunit/test.h:708:40: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
     708 |         const typeof(right) __right = (right);                                 \
         |                                        ^~~~~
   include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
     903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
     900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |         ^~~~~~~~~~~~~~~~~~~
   lib/test_bits.c:48:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
      48 |         KUNIT_EXPECT_EQ(test, 0xffffffffffffffffULL, GENMASK_U128(63, 0));
         |         ^~~~~~~~~~~~~~~
   include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
      29 | #define _U128(x)        (_AC128(x))
         |                          ^~~~~~
   include/uapi/linux/bits.h:16:26: note: in expansion of macro '_U128'
      16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \


vim +/__int128 +24 include/uapi/linux/const.h

9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02   6  
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02   7  /* Some constant macros are used in both assembler and
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02   8   * C code.  Therefore we cannot annotate them always with
6df95fd7ad9a84 include/linux/const.h      Randy Dunlap        2007-05-08   9   * 'UL' and other type specifiers unilaterally.  We
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  10   * use the following macros to deal with this.
74ef649fe847fd include/linux/const.h      Jeremy Fitzhardinge 2008-01-30  11   *
74ef649fe847fd include/linux/const.h      Jeremy Fitzhardinge 2008-01-30  12   * Similarly, _AT() will cast an expression with a type in C, but
74ef649fe847fd include/linux/const.h      Jeremy Fitzhardinge 2008-01-30  13   * leave it unchanged in asm.
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  14   */
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  15  
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  16  #ifdef __ASSEMBLY__
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  17  #define _AC(X,Y)	X
74ef649fe847fd include/linux/const.h      Jeremy Fitzhardinge 2008-01-30  18  #define _AT(T,X)	X
bcf33156d03759 include/uapi/linux/const.h Anshuman Khandual   2024-07-24  19  #define _AC128(X)	X
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  20  #else
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  21  #define __AC(X,Y)	(X##Y)
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  22  #define _AC(X,Y)	__AC(X,Y)
74ef649fe847fd include/linux/const.h      Jeremy Fitzhardinge 2008-01-30  23  #define _AT(T,X)	((T)(X))
bcf33156d03759 include/uapi/linux/const.h Anshuman Khandual   2024-07-24 @24  #define _AC128(X)	((unsigned __int128)(X))
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  25  #endif
9d291e787b2b71 include/asm-x86_64/const.h Vivek Goyal         2007-05-02  26  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
  2024-07-25  1:04   ` kernel test robot
@ 2024-07-25  4:19     ` Anshuman Khandual
  0 siblings, 0 replies; 11+ messages in thread
From: Anshuman Khandual @ 2024-07-25  4:19 UTC (permalink / raw)
  To: kernel test robot, linux-kernel
  Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List,
	Yury Norov, Rasmus Villemoes, Arnd Bergmann, linux-arch



On 7/25/24 06:34, kernel test robot wrote:
> Hi Anshuman,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on arnd-asm-generic/master]
> [also build test ERROR on akpm-mm/mm-nonmm-unstable akpm-mm/mm-everything linus/master v6.10 next-20240724]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/uapi-Define-GENMASK_U128/20240724-184809
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
> patch link:    https://lore.kernel.org/r/20240724103142.165693-3-anshuman.khandual%40arm.com
> patch subject: [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128()
> config: m68k-sun3x_defconfig (https://download.01.org/0day-ci/archive/20240725/202407250853.f3pSzob6-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 14.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407250853.f3pSzob6-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202407250853.f3pSzob6-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from lib/test_bits.c:6:
>    lib/test_bits.c: In function 'genmask_u128_test':
>>> include/uapi/linux/const.h:24:36: error: '__int128' is not supported on this target
>       24 | #define _AC128(X)       ((unsigned __int128)(X))
>          |                                    ^~~~~~~~
>    include/kunit/test.h:708:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>      708 |         const typeof(right) __right = (right);                                 \
>          |                      ^~~~~
>    include/kunit/test.h:903:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>      903 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/kunit/test.h:900:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>      900 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>          |         ^~~~~~~~~~~~~~~~~~~
>    lib/test_bits.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>       45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);
>          |         ^~~~~~~~~~~~~~~
>    include/uapi/linux/const.h:29:26: note: in expansion of macro '_AC128'
>       29 | #define _U128(x)        (_AC128(x))
>          |                          ^~~~~~
>    include/uapi/linux/bits.h:16:13: note: in expansion of macro '_U128'
>       16 |         (((~_U128(0)) - (_U128(1) << (l)) + 1) & \
>          |             ^~~~~
>    include/linux/bits.h:39:38: note: in expansion of macro '__GENMASK_U128'
>       39 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK_U128(h, l))
>          |                                      ^~~~~~~~~~~~~~
>    lib/test_bits.c:45:54: note: in expansion of macro 'GENMASK_U128'
>       45 |         KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ULL, GENMASK_U128(87, 80) >> 64);

This is probably triggered with GENMASK_U128() usage which is not protected
with ARCH_SUPPORTS_INT128. Will respin the series with required fixes.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-25  4:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 10:31 [PATCH 0/2] uapi: Add support for GENMASK_U128() Anshuman Khandual
2024-07-24 10:31 ` [PATCH 1/2] uapi: Define GENMASK_U128 Anshuman Khandual
2024-07-24 11:03   ` Arnd Bergmann
2024-07-24 11:59     ` Anshuman Khandual
2024-07-24 12:37       ` Arnd Bergmann
2024-07-24 10:31 ` [PATCH 2/2] lib/test_bits.c: Add tests for GENMASK_U128() Anshuman Khandual
2024-07-24 10:45   ` Arnd Bergmann
2024-07-24 12:00     ` Anshuman Khandual
2024-07-25  1:04   ` kernel test robot
2024-07-25  4:19     ` Anshuman Khandual
2024-07-24 10:33 ` [PATCH 0/2] uapi: Add support " Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox