From nobody Wed Apr 22 20:47:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1B9s4l7Jz6bJ22 for ; Wed, 22 Apr 2026 20:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1B9s2NJqz3YTL for ; Wed, 22 Apr 2026 20:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776890849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5y3mS/s7uzxKZDoRuhsZ5cELmUqjy8/dyY/uxb76Vo=; b=imhaiBGmOOOvoSenA0pGfrW696nseOwWg7L8Pjnqe2IkNvakZ/B9Pfa1SH5n+cERuLMHGV ueO1HYV+8YGWMyYVyHbED/2lvhDFhZVKefDVRo5fw7yi59zFL2xW33o9GkL00Bc1iuLydB zBV0O6G5HprdUjD6VdXRtoe2lchYGC9xPH/tl4d+e0Hy/WNtngnGa12h3BB4jv7EeAntAr 6X8nkJhm65s0MffBzvnGpKWgfuQoCBLju4Pdo89y+llTn3jg/Gpwy352l0+yvBAT7FOx/+ HtEtYCFhMtAGSWzMPNq/4GdCV3DL2s/xlbkN+HfvkiknoGewj5c5rVjsNX5HpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776890849; a=rsa-sha256; cv=none; b=Lpcz2CbnVAavWeXcfx1MoDvk6sN3nabx6gkw1+2cMZJyxuQmIcsaxd8B8zQ4ajYo7t3ZE9 LQolIRYwtfqeCnDEEgtQUz5tBR0s0qKB3r/HMRsdt8c/FH07Akh6zVgReNWM3Ieftk9ast /R860jBdSMpZI+DrKuO9h12MxGkqeVONbqelD5QicVerPvy2r5cZbQpBm21VAHNj+SLn/T 880r1aFm/pSbjhwTgJNaSuHiQe52x6z32KQWx+lh2zF5udK+XJpmTjqHQRxFb7D0eEWe65 LySxnWg2YT+tUwh13piOEqWY6K0yvpY9LUdx6X+XyvOF1C/xAZic980V8i66Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776890849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5y3mS/s7uzxKZDoRuhsZ5cELmUqjy8/dyY/uxb76Vo=; b=dZWkXeZV+pqrZs3vphMkBwYZ0B1nibdksDGm4He5vDW/IfFqqbzBFs/KSBDsvKgIs1GzRG aZ0B1pVZa35tGbqdpZqTT85lcBd8TulCy2/pemXllxINPt4RkmjcJ/CxiOE24AVoy74LpJ Z2ym7s+g8pD7j4+762zewUcPbPoEHDG7y6+ao3UzZI+6qXfl+tpctKvFOgeBL8iXEYs+/j dd3ehzwvfTVLoQxliGGbuwNx8Mm2Sl6e/9JAaWbdZOw5up7unpm9Xvlt8gJlOzTVzN5wMS /ETWnGruQUOJEKZ+DgG1ZdYZZkSDs3Hcu2d0JYilDlexcubSu/2Hmw/ocwjlCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1B9s1m6szn5T for ; Wed, 22 Apr 2026 20:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23df0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:47:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 47e1ca7f3720 - main - linuxkpi: Move `GENMASK()` to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47e1ca7f3720c76fdc729e03034fa53c798b9318 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:47:29 +0000 Message-Id: <69e933e1.23df0.2e69ad5@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=47e1ca7f3720c76fdc729e03034fa53c798b9318 commit 47e1ca7f3720c76fdc729e03034fa53c798b9318 Author: Jean-Sébastien Pédron AuthorDate: 2026-04-22 16:21:40 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-22 20:46:58 +0000 linuxkpi: Move `GENMASK()` to ... from . This matches the location on Linux. is also included from . Therefore it will not break anything. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56584 --- sys/compat/linuxkpi/common/include/linux/bitops.h | 4 ++-- sys/compat/linuxkpi/common/include/linux/bits.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 125081ab5b74..0244c7d6f476 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -35,6 +35,8 @@ #include #include +#include + #define BIT(nr) (1UL << (nr)) #define BIT_ULL(nr) (1ULL << (nr)) #define BITS_PER_LONG (__SIZEOF_LONG__ * __CHAR_BIT__) @@ -45,8 +47,6 @@ #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) -#define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) -#define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) #define BITS_TO_BYTES(n) howmany((n), BITS_PER_BYTE) diff --git a/sys/compat/linuxkpi/common/include/linux/bits.h b/sys/compat/linuxkpi/common/include/linux/bits.h new file mode 100644 index 000000000000..53deb7cbbe88 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/bits.h @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2016 Kip Macy + * Copyright (c) 2018 Johannes Lundberg + */ + +#ifndef _LINUXKPI_LINUX_BITS_H_ +#define _LINUXKPI_LINUX_BITS_H_ + +#define GENMASK(h, l) (((~0UL) >> (BITS_PER_LONG - (h) - 1)) & ((~0UL) << (l))) +#define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) + +#endif /* _LINUXKPI_LINUX_BITS_H_ */