Skip to content

Commit fa7a1e8

Browse files
committed
tools headers: Synchronize uapi/linux/bits.h with the kernel sources
To pick up the changes in this cset: 1e7933a ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/bits.h include/uapi/linux/bits.h Please see tools/include/uapi/README for further details. Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Acked-by: Yury Norov [NVIDIA] <yury.norov@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: I Hsin Cheng <richard120310@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20250519214126.1652491-6-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 83dcc12 commit fa7a1e8

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • tools/include/uapi/linux

tools/include/uapi/linux/bits.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
#ifndef _UAPI_LINUX_BITS_H
55
#define _UAPI_LINUX_BITS_H
66

7-
#define __GENMASK(h, l) \
8-
(((~_UL(0)) - (_UL(1) << (l)) + 1) & \
9-
(~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
7+
#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
108

11-
#define __GENMASK_ULL(h, l) \
12-
(((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
13-
(~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
9+
#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
1410

1511
#define __GENMASK_U128(h, l) \
1612
((_BIT128((h)) << 1) - (_BIT128(l)))

0 commit comments

Comments
 (0)