From nobody Mon Apr 22 19:43:57 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 4VNbKT3yNMz5Hlbx; Mon, 22 Apr 2024 19:43:57 +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 4VNbKT2Sprz4mYt; Mon, 22 Apr 2024 19:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713815037; 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=zlrAeD0Y8qxHb6jtYfIGtCrfNcPhqCXvEo4OrLhztvM=; b=YFF/hNZrCKvQTP7yeT712bCrYwzqWx0gx8sO/s6zT2i8h0+JRd6GVgCNtf3bIwUdeSpU21 G3gbLN9VIAnhmQlMgKSmN6zsH3Fa+RVl98fx6eaXZSdM3IKWTuWPD315zCWViRfEgnB1VS SNBtAA/Vm1jhlhg9z8ON7ClfWdZCjT+lmcNRZfusW+SE+e6eX9TKs/6QooKIXkdNeOD8rO z6fSGbanUix6VkCKZd6Yh+eHaAWfgsGMRpUnIkKxYR9bNi3RlnERvvJ+cBx+nsAoPwO/Xz 5A1h6sOqUe8xY8E6twYFvp1k+gfeABuo3xfRHF+NJ+IFeWCUnsCAKgr0Q1mMsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713815037; a=rsa-sha256; cv=none; b=l91lxK546uBVM7VzOZwW3W9Ye0ZRE6dBtAav5EqluI7SNtcNoO3Wgrclnc9pHxiw1XOVgf V1sUqXdNx8eeTZXlHtOnkr5DNU4GKBYcHi9q6kCnKSu157OFrGC1AVR/7Oz6r+2hrsTG+2 nKRJ7AJcruekGwoiyQAnd4vihCJR3jrUrKQPv4uGftmIJ/PKTCPAB97yx8+jpIyF39EQDi IX8NaUtcYAY/ac4FqdeuSrbHp2CMBCa15bJ6TnRUk4/TyFZ/9YeSkdqtRJh5kOLuJLdevB jNzlCMbTpKoXHDYTnouF8E0GmgedH8b6DSkDFNLAwSNKIimFAal8T9ebQ62ObQ== 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=1713815037; 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=zlrAeD0Y8qxHb6jtYfIGtCrfNcPhqCXvEo4OrLhztvM=; b=N2kvgB+vGX3ECpB1uC++ikdJPzNWNEatckuh3qS8ZUJIRa+GDdwaUW95nl0/M+9nNY56uu PkXLPYn/I0RLCQ0ATa+aPR3FBnGUnHRPaultXxNgcV6F/A77y5Xjffe69nzuIlkMHzmlsg tfY+o+wdrjkjybHsRU48hDxAQX098VM6wMuLtrEKFOLvki2RkW43nf8BdJRjq4ULOA2WT/ eXWZB91kNSH9HCN/ex8P21b25Pn2Obm5OQmptPmZqiXJmDa4NTXzg80a66LhsY2gnwfEAk zz0fG4xC8r9G2aPP7T4/soPIMMCQqxyyy2mGOsoAoi8GtRcSmusMGELUi70Tbw== 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 4VNbKT222Hz11fd; Mon, 22 Apr 2024 19:43:57 +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 43MJhvTu032007; Mon, 22 Apr 2024 19:43:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MJhvcO032004; Mon, 22 Apr 2024 19:43:57 GMT (envelope-from git) Date: Mon, 22 Apr 2024 19:43:57 GMT Message-Id: <202404221943.43MJhvcO032004@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: a939c9544033 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: a939c954403314318d64d848534a4f9e3578217a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a939c954403314318d64d848534a4f9e3578217a commit a939c954403314318d64d848534a4f9e3578217a Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:48:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-04-22 16:59:40 +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)