summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlejandro Lucero <alucerop@amd.com>2026-03-06 19:47:38 +0300
committerDave Jiang <dave.jiang@intel.com>2026-03-17 02:24:29 +0300
commit9a775c07bb04384f7c03a35dd04818ed818c1f71 (patch)
treefb91e67d39f7f6b7b0864c2e6b3ba46612e5a7c5 /tools
parentf338e77383789c0cae23ca3d48adcc5e9e137e3c (diff)
downloadlinux-9a775c07bb04384f7c03a35dd04818ed818c1f71.tar.xz
cxl: support Type2 when initializing cxl_dev_state
In preparation for type2 drivers add function and macro for differentiating CXL memory expanders (type 3) from CXL device accelerators (type 2) helping drivers built from public headers to embed struct cxl_dev_state inside a private struct. Update type3 driver for using this same initialization. Signed-off-by: Alejandro Lucero <alucerop@amd.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Gregory Price <gourry@gourry.net> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20260306164741.3796372-2-alejandro.lucero-palau@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/cxl/test/mem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index cb87e8c0e63c..79f42f4474d4 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -1716,7 +1716,7 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
if (rc)
return rc;
- mds = cxl_memdev_state_create(dev);
+ mds = cxl_memdev_state_create(dev, pdev->id + 1, 0);
if (IS_ERR(mds))
return PTR_ERR(mds);
@@ -1732,7 +1732,6 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
mds->event.buf = (struct cxl_get_event_payload *) mdata->event_buf;
INIT_DELAYED_WORK(&mds->security.poll_dwork, cxl_mockmem_sanitize_work);
- cxlds->serial = pdev->id + 1;
if (is_rcd(pdev))
cxlds->rcd = true;