From nobody Mon Aug 26 18:03:17 2024 X-Original-To: dev-commits-src-branches@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 4Wsz794Bzgz5TM4s; Mon, 26 Aug 2024 18:03:17 +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 4Wsz792DYTz44RH; Mon, 26 Aug 2024 18:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724695397; 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=ltXwUkh2TLLC4ady714CCKLExZgz5iNRG2Be8NLrxuI=; b=XZfGMrn7X2iLCQEL48l3xyG2lPUFLrN2WVeS8UTR0eXH0FO8GU8lUZwNbPd4Jdkdqur3Og fXVxQipv+ilWvwFUBHUwy0/SCm8bPBxb2b5xSAhQWdU2oWcGzsvXKJ967QAAK1b/7K44g2 5FB45c47G5gVsQiV4yF3c0jqSyiDR9xn0ZEZWeJ5rV4/2nKAzJYyAwoDmYUXEzEzpncAla PnYBHw+V4vNCVJ/ML/feorvuqq6wGwq8KU1fnhl2s9DX9odN+AD8SvsThrPynnq4AdJsjN Xm1KXOs+j8/pQYuUOpSvbXyCuFb3c+1dLinfE5PEKavZURKyHqTPVakdrDGxng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724695397; a=rsa-sha256; cv=none; b=y4kuZLbxRQg5UUYnj+44KApyCID9Vslkt/x9jgUYaHyf5itfCD3VI31AOVoKdFiq3J5KuM fPS8zlD8ol73BjI5vGRj0o27FeYZ02Wasj3LPNItBZ2L5xk6OK56RLxONqJ8CFAARiBjLM PbvFJd3CLNj/2UoZq2QHQzlO/AaHO8TuYP3imly5IVo0GcxPM52P2eXCBEmK09a3qbRVTQ gv1uIPmop/86OA4lPqlVrjPF65QM5gfqTZUDnRDMyyRuJetXA5xcGwdKTq22qzMySkk6V6 2tnhDP2//BA8gCeaPMPXhStMOeSQRU5gVjh1E1tBHz9rC2cJcnXUejrMzbw5OA== 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=1724695397; 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=ltXwUkh2TLLC4ady714CCKLExZgz5iNRG2Be8NLrxuI=; b=H44F7hJHnH3yzGr8vLT8qQewjL6kvJ5bboffE3xrhQnFA/bwg4fe3/pwtjHzixKIKIWnf6 FMRuKNTti/k2agL+3WKpoD6ev/xd6pfdr359OKPYp0gdNDkcZcpV2CTSV7iCvxJF2nlRFR sJKHJrvJ8B9c3V55XLdXOacwFhcSOpXurpe9VUMI2/KBTDG471AIYve5k5BhaS7YhJsGsT rvrsbDEaikTnnGf6xUpAcx0C/wxfQKp0dVPMphUBxpLWruXWOOA4RVOHHITSTqaI4A6b88 XDtCqWYnRYsrHSos46ACy8R9HfGZuKPNZ8rWCt5R5bW1q53cHWXpdtN0LWinJQ== 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 4Wsz791pFFzH9G; Mon, 26 Aug 2024 18:03:17 +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 47QI3Ho3042614; Mon, 26 Aug 2024 18:03:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47QI3HUn042611; Mon, 26 Aug 2024 18:03:17 GMT (envelope-from git) Date: Mon, 26 Aug 2024 18:03:17 GMT Message-Id: <202408261803.47QI3HUn042611@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: 80a92f1b91ed - stable/14 - nvme: Rename NVMEB helper macro to NVMEM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 80a92f1b91ed90a5245651507b1af8c4fb616136 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=80a92f1b91ed90a5245651507b1af8c4fb616136 commit 80a92f1b91ed90a5245651507b1af8c4fb616136 Author: John Baldwin AuthorDate: 2024-01-29 18:58:28 +0000 Commit: John Baldwin CommitDate: 2024-08-26 17:26:38 +0000 nvme: Rename NVMEB helper macro to NVMEM The current macro always builds a full mask for a named field, so use the M suffix for mask. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43601 (cherry picked from commit 1dade1f255ee535ad357211395b46188bece52dc) --- sys/dev/nvme/nvme.h | 2 +- usr.sbin/bhyve/pci_nvme.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index cb5e1a5f1118..7b3cdd89f146 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -605,7 +605,7 @@ enum nvme_critical_warning_state { #define NVME_FEAT_SET_FID_MASK (0xff) /* Helper macro to combine *_MASK and *_SHIFT defines */ -#define NVMEB(name) (name##_MASK << name##_SHIFT) +#define NVMEM(name) (name##_MASK << name##_SHIFT) /* Helper macro to extract value from x */ #define NVMEV(name, x) (((x) >> name##_SHIFT) & name##_MASK) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index dd6c9a41d17f..2d426fb19096 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -538,12 +538,12 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->cntrltype = NVME_CNTRLTYPE_IO; cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; - cd->oaes = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR); + cd->oaes = NVMEM(NVME_CTRLR_DATA_OAES_NS_ATTR); cd->acl = 2; cd->aerl = 4; /* Advertise 1, Read-only firmware slot */ - cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | + cd->frmw = NVMEM(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); cd->lpa = 0; /* TODO: support some simple things like SMART */ cd->elpe = 0; /* max error log page entries */