mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	I Hsin Cheng <richard120310@gmail.com>,
	Yury Norov <yury.norov@gmail.com>
Subject: [PATCH 5/7] tools headers: Synchronize uapi/linux/bits.h with the kernel sources
Date: Mon, 19 May 2025 18:41:24 -0300	[thread overview]
Message-ID: <20250519214126.1652491-6-acme@kernel.org> (raw)
In-Reply-To: <20250519214126.1652491-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

To pick up the changes in this cset:

  1e7933a575ed8af4 ("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.

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>
Cc: Yury Norov <yury.norov@gmail.com>
Link: https://lore.kernel.org/r/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/linux/bits.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/include/uapi/linux/bits.h b/tools/include/uapi/linux/bits.h
index 5ee30f882736cbd1..682b406e10679dc8 100644
--- a/tools/include/uapi/linux/bits.h
+++ b/tools/include/uapi/linux/bits.h
@@ -4,13 +4,9 @@
 #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(h, l) (((~_UL(0)) << (l)) & (~_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))))
+#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
 
 #define __GENMASK_U128(h, l) \
 	((_BIT128((h)) << 1) - (_BIT128(l)))
-- 
2.49.0


  parent reply	other threads:[~2025-05-19 21:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 21:41 [PATCH FYI 0/7] Updating some kernel headers " Arnaldo Carvalho de Melo
2025-05-19 21:41 ` [PATCH 1/7] tools include UAPI: Sync linux/vhost.h " Arnaldo Carvalho de Melo
2025-05-20  7:20   ` Stefano Garzarella
2025-05-20 15:57     ` Arnaldo Carvalho de Melo
2025-05-24 10:58   ` Michael S. Tsirkin
2025-05-19 21:41 ` [PATCH 2/7] tools arch x86: Sync the msr-index.h copy " Arnaldo Carvalho de Melo
2025-05-19 21:41 ` [PATCH 3/7] tools headers x86 cpufeatures: Sync with the kernel sources to pick ZEN6 and Indirect Target Selection (ITS) bits Arnaldo Carvalho de Melo
2025-05-19 21:41 ` [PATCH 4/7] tools headers: Sync the linux/unaligned.h copy with the kernel sources Arnaldo Carvalho de Melo
2025-05-19 21:41 ` Arnaldo Carvalho de Melo [this message]
2025-05-19 21:41 ` [PATCH 6/7] tools headers compiler: Pick the const_true() define from " Arnaldo Carvalho de Melo
2025-05-19 21:41 ` [PATCH 7/7] tools headers: Synchronize linux/bits.h with " Arnaldo Carvalho de Melo
2025-05-19 23:41 ` [PATCH FYI 0/7] Updating some kernel headers " Namhyung Kim
2025-05-20  0:44 ` Vincent Mailhol
2025-05-20 15:52   ` Arnaldo Carvalho de Melo
2025-05-20 16:02     ` Vincent Mailhol
2025-05-20 19:38       ` Arnaldo Carvalho de Melo
2025-05-20  3:48 ` Yury Norov
2025-05-20 15:56   ` Arnaldo Carvalho de Melo
2025-05-20 16:09     ` Yury Norov

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=20250519214126.1652491-6-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=richard120310@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®