tools headers: Synchronize linux/bits.h with the kernel sources

To pick up the changes in this cset:

   3c7a8e19 ("uapi: introduce uapi-friendly macros for GENMASK")

That just causes perf to rebuild. Its just some macros going to an uapi
header that we now have to grab a copy into tools/ as well.

This addresses this perf build warning:

  Warning: Kernel ABI header differences:
    diff -u tools/include/linux/bits.h include/linux/bits.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/lkml/ZiwJsFOBez0MS4r9@x1Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8f211643
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/const.h> #include <linux/const.h>
#include <vdso/bits.h> #include <vdso/bits.h>
#include <uapi/linux/bits.h>
#include <asm/bitsperlong.h> #include <asm/bitsperlong.h>
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG)) #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
...@@ -30,15 +31,8 @@ ...@@ -30,15 +31,8 @@
#define GENMASK_INPUT_CHECK(h, l) 0 #define GENMASK_INPUT_CHECK(h, l) 0
#endif #endif
#define __GENMASK(h, l) \
(((~UL(0)) - (UL(1) << (l)) + 1) & \
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
#define GENMASK(h, l) \ #define GENMASK(h, l) \
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
#define __GENMASK_ULL(h, l) \
(((~ULL(0)) - (ULL(1) << (l)) + 1) & \
(~ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
#define GENMASK_ULL(h, l) \ #define GENMASK_ULL(h, l) \
(GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l)) (GENMASK_INPUT_CHECK(h, l) + __GENMASK_ULL(h, l))
......
...@@ -24,4 +24,8 @@ ...@@ -24,4 +24,8 @@
#endif #endif
#endif #endif
#ifndef __BITS_PER_LONG_LONG
#define __BITS_PER_LONG_LONG 64
#endif
#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* bits.h: Macros for dealing with bitmasks. */
#ifndef _UAPI_LINUX_BITS_H
#define _UAPI_LINUX_BITS_H
#define __GENMASK(h, l) \
(((~_UL(0)) - (_UL(1) << (l)) + 1) & \
(~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
#define __GENMASK_ULL(h, l) \
(((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
(~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
#endif /* _UAPI_LINUX_BITS_H */
...@@ -9,6 +9,7 @@ FILES=( ...@@ -9,6 +9,7 @@ FILES=(
"include/uapi/linux/const.h" "include/uapi/linux/const.h"
"include/uapi/drm/drm.h" "include/uapi/drm/drm.h"
"include/uapi/drm/i915_drm.h" "include/uapi/drm/i915_drm.h"
"include/uapi/linux/bits.h"
"include/uapi/linux/fadvise.h" "include/uapi/linux/fadvise.h"
"include/uapi/linux/fscrypt.h" "include/uapi/linux/fscrypt.h"
"include/uapi/linux/kcmp.h" "include/uapi/linux/kcmp.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment