aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/cxl/test/mock.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-05-18 16:35:17 -0700
committerDan Williams <dan.j.williams@intel.com>2022-05-19 08:50:42 -0700
commitfcfbc93cc33ec601f00f113eca6fc484b930532d (patch)
tree34f9211524cad8a5a060d257612d9126e2bf9c22 /tools/testing/cxl/test/mock.c
parentcxl/port: Move endpoint HDM Decoder Capability init to port driver (diff)
downloadwireguard-linux-fcfbc93cc33ec601f00f113eca6fc484b930532d.tar.xz
wireguard-linux-fcfbc93cc33ec601f00f113eca6fc484b930532d.zip
cxl/port: Reuse 'struct cxl_hdm' context for hdm init
The port driver maps component registers for port operations. Reuse that mapping for HDM Decoder Capability setup / enable. Move devm_cxl_setup_hdm() before cxl_hdm_decode_init() and plumb @cxlhdm through the hdm init helpers. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/165291691712.1426646.14336397551571515480.stgit@dwillia2-xfh Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing/cxl/test/mock.c')
-rw-r--r--tools/testing/cxl/test/mock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index 45ffbb8f519a..f1f8c40948c5 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -208,13 +208,14 @@ int __wrap_cxl_await_media_ready(struct cxl_dev_state *cxlds)
}
EXPORT_SYMBOL_NS_GPL(__wrap_cxl_await_media_ready, CXL);
-bool __wrap_cxl_hdm_decode_init(struct cxl_dev_state *cxlds)
+bool __wrap_cxl_hdm_decode_init(struct cxl_dev_state *cxlds,
+ struct cxl_hdm *cxlhdm)
{
int rc = 0, index;
struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
if (!ops || !ops->is_mock_dev(cxlds->dev))
- rc = cxl_hdm_decode_init(cxlds);
+ rc = cxl_hdm_decode_init(cxlds, cxlhdm);
put_cxl_mock_ops(index);
return rc;