Skip to content

Commit ab8aaab

Browse files
committed
tools headers UAPI: Sync linux/const.h with the kernel headers
To pick up the changes in: 947697c ("uapi: Define GENMASK_U128") That causes no changes in tooling, just addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/const.h include/uapi/linux/const.h Cc: Adrian Hunter <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Yury Norov <[email protected]> Link: https://lore.kernel.org/lkml/ZwltGNJwujKu1Fgn@x1 Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent c964ced commit ab8aaab

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tools/include/uapi/linux/const.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@
2828
#define _BITUL(x) (_UL(1) << (x))
2929
#define _BITULL(x) (_ULL(1) << (x))
3030

31+
#if !defined(__ASSEMBLY__)
32+
/*
33+
* Missing asm support
34+
*
35+
* __BIT128() would not work in the asm code, as it shifts an
36+
* 'unsigned __init128' data type as direct representation of
37+
* 128 bit constants is not supported in the gcc compiler, as
38+
* they get silently truncated.
39+
*
40+
* TODO: Please revisit this implementation when gcc compiler
41+
* starts representing 128 bit constants directly like long
42+
* and unsigned long etc. Subsequently drop the comment for
43+
* GENMASK_U128() which would then start supporting asm code.
44+
*/
45+
#define _BIT128(x) ((unsigned __int128)(1) << (x))
46+
#endif
47+
3148
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
3249
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
3350

0 commit comments

Comments
 (0)