From nobody Wed Jun 12 19:16:40 2024 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 4VzwJS69Kqz5NHmW; Wed, 12 Jun 2024 19:16:40 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJS3nKNz56Vy; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; 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=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=yl7kC8TT6OQf+wyfL1JyL1FxZJ3Smv9bcnkCK83RltTkNYEO2M69URg9qZ7ZqWydAlPF41 jImwncwl1b+cutP2CCNtR1EW7Adxo1WC/2HuFM9Z23D5mbIaGW0M9ykAioiKpH98Bw+E6e tP8fyQ9AA2G+MEFC0BLDnd+qijgAY3eSHwCFxwSj63QxPqElND8Cz4dYwMDNrG4BCegOZB mPOBhbHZizvy7539IFlVxYzzW17ul40mlZ0fdfN7Ee5qkE9ZL85g6P/uMF5pYICqU0UA+G 8u0KujEEN79tXgo7zGZZLygoRDUDz2Eh8gt04SXlRg/tb2g2Hz059tzHNymuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219800; a=rsa-sha256; cv=none; b=oJ4rSZ69kktMFVT1bIrOAeWE8rCm7zsyhg0RIkwIi7UOzbFsNdScr94FlL13a5iwnquGPQ HncCwV/nRNLYrcyZnVHhLAVJtj0uZg3e0v4aVG3NeKbQKSNTaa5r2Oj0gekdagOgpaNv9u dWJ6tADuyDUDa7nvZT565+TS7sHZXwDp57pevCbDte4gIxemkH4zawvd5RSELSRVi7+pCJ e07bgQAT19vkcG8JX6htg+WqLBSasQDDbnG82bUJ31Q1eI5SsDqQ9j+61inrR46/t/T8E9 2ZVl9oukoae2rTofDeR4WXy7bTYGunGwhG41BkslqW9ZwzKjuDBk9pNIipxZ1w== 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=1718219800; 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=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=Ci0yMCsdl8DL19HjUQQ2OLMxrOhcKL0UF11UWZKWYqYu7/bPRy7ODMQzOQvxkoOqjPTwMq 71CsKS9I/oWtW/CAlJZ7aiMKqUOBK+dhvGFXvAnQ3zKamLcAo1yZTFZjxA1UgNxgNeMsSG pvs2maiBS1/a5qhcG7udOPOdxmnvJQZdumMHQ1SHEYv/6uUPkSke3g1MV+45janqaPuqH3 2QVPzB/1wu/Z6kal/+sjuOsredPEk83zOXJ6619/IPik5HPIA/O5E7LJ4jVDZ0iTcL77+q 66Oq08rbBDIMjlYGVqqa0C3MUhvZ2XzvuhTGD1mFmSeoClGXJshs8SPbLmqjXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJS3N9Xz14mQ; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGehM003716; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGexJ003713; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:40 GMT Message-Id: <202406121916.45CJGexJ003713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8d796198774d - stable/13 - LinuxKPI: add BITS_TO_BYTES() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d796198774d0908f7a1328fa7257b37ed665a35 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d796198774d0908f7a1328fa7257b37ed665a35 commit 8d796198774d0908f7a1328fa7257b37ed665a35 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:48:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:06 +0000 LinuxKPI: add BITS_TO_BYTES() Just like BITS_TO_LONG() ... used in rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44603 (cherry picked from commit f674f016c03d49e14f1c651ed088a6f2d01a62ee) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 58677631b604..1415d5224084 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -54,6 +54,7 @@ #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) #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x)