From: Dave Jiang <dave.jiang@intel.com>
To: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev
Cc: vishal.l.verma@intel.com
Subject: [PATCH 2/4] ndctl/libndctl: Add bus_prefix for cxl
Date: Wed, 21 Sep 2022 14:02:47 -0700 [thread overview]
Message-ID: <166379416797.433612.11380777795382753298.stgit@djiang5-desk3.ch.intel.com> (raw)
In-Reply-To: <166379397620.433612.13099557870939895846.stgit@djiang5-desk3.ch.intel.com>
With support of being able to detect the cxl bus, setup the bus_prefix
for cxl bus.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
ndctl/lib/libndctl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index 10422e24d38b..d2e800bc840a 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -2012,6 +2012,12 @@ static void *add_dimm(void *parent, int id, const char *dimm_base)
goto out;
}
rc = add_papr_dimm(dimm, dimm_base);
+ } else if (ndctl_bus_has_cxl(bus)) {
+ dimm->bus_prefix = strdup("cxl");
+ if (!dimm->bus_prefix) {
+ rc = -ENOMEM;
+ goto out;
+ }
}
if (rc == -ENODEV) {
next prev parent reply other threads:[~2022-09-21 21:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 21:02 [PATCH 0/4] ndctl: Add security test for cxl devices through nvdimm Dave Jiang
2022-09-21 21:02 ` [PATCH 1/4] ndctl: add cxl bus detection Dave Jiang
2022-12-13 23:07 ` Verma, Vishal L
2022-12-14 2:40 ` Alison Schofield
2022-09-21 21:02 ` Dave Jiang [this message]
2022-12-13 23:10 ` [PATCH 2/4] ndctl/libndctl: Add bus_prefix for cxl Verma, Vishal L
2022-09-21 21:02 ` [PATCH 3/4] ndctl/libndctl: Add retrieving of unique_id for cxl mem dev Dave Jiang
2022-12-13 23:14 ` Verma, Vishal L
2022-09-21 21:02 ` [PATCH 4/4] ndctl/test: Add CXL test for security Dave Jiang
2022-12-13 23:22 ` Verma, Vishal L
2022-12-14 1:02 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166379416797.433612.11380777795382753298.stgit@djiang5-desk3.ch.intel.com \
--to=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).