From nobody Mon Aug 26 18:03:20 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 4Wsz7F1qWpz5TMGn; Mon, 26 Aug 2024 18:03:21 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wsz7D4gjsz44b0; Mon, 26 Aug 2024 18:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724695400; 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=6DEf2brWfOq9fpHWr9Q76WzMsAJPV/rht+bimMtncrg=; b=jllJNugLOCkiL3VzvErxW8oqVKud16HBiF5kxXk3GvR/CdvgEHJYctmGKsaaFYkiP8jdw6 dGWc3Sid8IGk39m2XS/zRDJayxNVv7tBRULDgDX8OA6YsABBR/qyyVyNHqdQ4seRjmoqhz qdM5/kOn9mrOxKE2tHL/PLg7zF4J4z99jp5BNO/czd03mEAxAfmh/fqV0qU6NuivM8H+nJ nk6MGFpJekc9SRihTA8kSxbFi0w2Pvhv3xS3AwY3c4QDaiNuTZBEeauErlOny3Pw4vbyPy xtfbzJ5xxV9nhFuBG3DT4oPUY1q785w+VUtUc+fAHY/90JEqjxkpScuWbMBQHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724695400; a=rsa-sha256; cv=none; b=RcKJtY5RkpbtSkhrVlNWi1F3T+UWE2TWY6gwQDIilG/Ebzc4tY+n1HI+yUgDjJgQ0E4L9b f5anyK3+EU5LRsb74La2AicePzUiOexvH3Fvpe9OlzRKM2Krgwyl7fqltfyad6/fDwFXrB KYbsBn/FhBAEDGGg1P7jERARp9yf2C708FBDEuCHbh6bCz74cXB2GFveywjSVkF0ikp2ig rUABPl+WZcydvoob4+C2AuSdKFAPNB+ij+uO1lMc5mj2GHunMLGC6jNPlcUF5qVh2kB5HA joJLGVWn94UY/Qc6zBfeCqX/QJnaRXHS7GwtxS6R1p7eXJHhMsa0oZmxDYWDlw== 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=1724695400; 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=6DEf2brWfOq9fpHWr9Q76WzMsAJPV/rht+bimMtncrg=; b=m7qZvXtwUt/gK9+cAdN4h61ZzlsHYGNs8m9JPM1qxAHxZAMIoSbPpCX1xdLkBhwEbRdOKN 1NkFhzZCYy7M+Ipfb6jf0oST8Xjh98AiyKJBIoiOHAkK2/7DRfZvOD+jnPLjtel3ph9vAs XdpsbjtDAwmnZZBz1X3U3DegAdLa3jzK0kztb7bRahLen21P7jfTFcWPBRYD3NQGK4m1Xx wk9swRw6zEynHhiFpvtmMTYBauQ8Z5EzW/tRElqVpGH/jZNuSo/8aHgIPDqgVKJYjHZ5+P DF/LMBMdaBmRsTXm6aVBREeDR3YREDelsp1uZAjgyz0CemvPITaSy1vqH0zvlw== 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 4Wsz7D49SwzHHM; Mon, 26 Aug 2024 18:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47QI3Keo042786; Mon, 26 Aug 2024 18:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47QI3KrM042783; Mon, 26 Aug 2024 18:03:20 GMT (envelope-from git) Date: Mon, 26 Aug 2024 18:03:20 GMT Message-Id: <202408261803.47QI3KrM042783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7566b99458a3 - stable/14 - nvme: Add NVMEF helper macro as the inverse of NVMEV 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7566b99458a31ad9ac2ef289c401fa008fd01386 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7566b99458a31ad9ac2ef289c401fa008fd01386 commit 7566b99458a31ad9ac2ef289c401fa008fd01386 Author: John Baldwin AuthorDate: 2024-01-29 19:00:57 +0000 Commit: John Baldwin CommitDate: 2024-08-26 17:27:01 +0000 nvme: Add NVMEF helper macro as the inverse of NVMEV This macro accepts a field name and a value for the field and constructs the shifted field value. Reviewed by: chuck Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43604 (cherry picked from commit 3a477a9b70a34dc0686630599c27f022b1e07bd8) --- sys/dev/nvme/nvme.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 7b3cdd89f146..137aff792868 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -610,6 +610,9 @@ enum nvme_critical_warning_state { /* Helper macro to extract value from x */ #define NVMEV(name, x) (((x) >> name##_SHIFT) & name##_MASK) +/* Helper macro to construct a field value */ +#define NVMEF(name, x) (((x) & name##_MASK) << name##_SHIFT) + /* CC register SHN field values */ enum shn_value { NVME_SHN_NORMAL = 0x1,