From nobody Wed Apr 29 21:43:14 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 4g5W4z2Kljz6c11L for ; Wed, 29 Apr 2026 21:43:15 +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 4g5W4y5zVWz3hBR for ; Wed, 29 Apr 2026 21:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777498994; 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=SvPRjuYq7BZUdMcaenuZeLGQX/dHZJy+YVjT6MtxrVY=; b=ZpiDuHFg8yfXHCaOv8Rqmmf9Ev/4RhdejvfI+BpQh/NpBkKHWMQVeWDzf5oZzpBXQgJB4C rFIcs0g6pnFSLA18K753DoD0YeGs0g4On8KzwDggg101O/faf/hpEa++vzFbOY0z5uliE+ 3obLCVSGtr7wzWMS+fqCuejfEpYNhspWCyop97zxs3TZIymx1NB6nwoxs1k7eJJi4ljvav Nmrbc1a0FM0loOr3mJdxB7wNo3Y4Qdmqdkv4xWoY/2bVH1EtTMTbVsjEG9tKvnL9qqmzV4 RniB2OqLq+85cQY9baE/VlSTWszx2/u91abtt19KDoLqbceHTNH97tvhPjhomA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777498994; a=rsa-sha256; cv=none; b=wKKrLvd/KEYfmZ/uA/ERzBF6N70muj3iDyMkFQS67hPozfVX3/zwffcJkVz5m9rKSJnZs/ 9tjr2nEMg7cNkUlrJDB4N70oKUzeUSrvnoSjDArmq230PmpfdjjJa7wazclXasnH/ix++v hOLz2a1IKnWrbn8DSuCupfQOyGoetIOuRrNJBMEd8kte/r56UAsFKOm866VLHchNehDWae 9n8ubMB06PS/ohsUTKvY6NRCgw4aTEuG+a8n5RVw9C9FH0wZqVZYxXRJl0GLLpMl+VMRaa QL3l31c96yT105Sh31c8pKW8XLjYDKk0aJuNIvrS2guL9w1XsXeGInsm9o7t0A== 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=1777498994; 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=SvPRjuYq7BZUdMcaenuZeLGQX/dHZJy+YVjT6MtxrVY=; b=UfcCreLL6dVFRNuGfqsRM8Uz3W4awixal6fWTrJHYiPrHr1yhNAISEQwwjDfZL0CyNtZN4 6szBz5/vaVtF+G8HJ6BDG/JRC2ObBPxzy1V8P793av39oruhR94wT627z29H7XTas0pOLf 8JOLNQZpadjY4iXUdZ4HxFWFC3z0Q9xJRRadd7zTWckL+WT1rxsRbjiQfoDPBSE8Irh4+s jaSaXCG/ZdlYly7lvb261ZHrUkJO6Znr4OuV7t91m1SzhJaIGVqeynN5rao9fMbEX2dGrk ldddJTkoRpOy/YxjkzSbthHPeXbkErVQlFPiaeO2O9O2hFoYO1MTexWcGY++GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5W4y5MhwzyCr for ; Wed, 29 Apr 2026 21:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47cb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 21:43:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 545039337945 - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 545039337945aa5854a63609bd2a8db3e93e0020 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 21:43:14 +0000 Message-Id: <69f27b72.47cb7.3e6bbc9c@gitrepo.freebsd.org> The branch stable/15 has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=545039337945aa5854a63609bd2a8db3e93e0020 commit 545039337945aa5854a63609bd2a8db3e93e0020 Author: Jean-Sébastien Pédron AuthorDate: 2026-04-22 16:21:40 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-29 21:04:25 +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 (cherry picked from commit 47e1ca7f3720c76fdc729e03034fa53c798b9318) --- 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_ */