Skip to contentSkip to conversation

test: add cxl region test template

PATCH In review luzhixing12345 2 participants 2 messages Sep 9, 2024 CXL

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: add cxl region test template

CXL2.0 support dynamic provisioning of new memory region, add cxl region test template

---
 MAINTAINERS                         | 1 +
 tools/testing/cxl/Kbuild            | 6 ++++++
 tools/testing/cxl/cxl_region_test.c | 6 ++++++
 tools/testing/cxl/test/cxl.c        | 1 +
 4 files changed, 14 insertions(+)
 create mode 100644 tools/testing/cxl/cxl_region_test.c
MAINTAINERS +1 -0
index 10430778c998..708407d34584 100644
@@ -5616,6 +5616,7 @@ M:	Alison Schofield <[email protected]>
 M:	Vishal Verma <[email protected]>
 M:	Ira Weiny <[email protected]>
 M:	Dan Williams <[email protected]>
+M:	luzhixing12345 <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/driver-api/cxl
tools/testing/cxl/Kbuild +6 -0
index 3d1ca9e38b1f..8b430274a1ad 100644
@@ -67,6 +67,12 @@ cxl_core-y += config_check.o
 cxl_core-y += cxl_core_test.o
 cxl_core-y += cxl_core_exports.o
 
+obj-m += cxl_region.o
+
+cxl_region-y += $(CXL_CORE_SRC)/region.o
+cxl_region-y += config_check.o
+cxl_region-y += cxl_region_test.o
+
 KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
 
 obj-m += test/
tools/testing/cxl/cxl_region_test.c new file +6 -0
new file mode 100644
index 000000000000..c5859a96e35b
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
+
+#include "watermark.h"
+
+cxl_test_watermark(cxl_region);
tools/testing/cxl/test/cxl.c +1 -0
index 90d5afd52dd0..320aaed2df17 100644
@@ -1304,6 +1304,7 @@ static __init int cxl_test_init(void)
 	cxl_mem_test();
 	cxl_pmem_test();
 	cxl_port_test();
+	cxl_region_test();
 
 	register_cxl_mock_ops(&cxl_mock_ops);
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 17 lines · On 9/9/24 2:19 AM, luzhixing12345 wrote:

CXL2.0 support dynamic provisioning of new memory region, add cxl region test template

---
 MAINTAINERS                         | 1 +
 tools/testing/cxl/Kbuild            | 6 ++++++
 tools/testing/cxl/cxl_region_test.c | 6 ++++++
 tools/testing/cxl/test/cxl.c        | 1 +
 4 files changed, 14 insertions(+)
 create mode 100644 tools/testing/cxl/cxl_region_test.c
MAINTAINERS +0 -0
index 10430778c998..708407d34584 100644

MAINTAINERS M: Alison Schofield <[email protected]> · line 5619

Quoted 4 lines
MAINTAINERS +1 -0
@@ -5616,6 +5616,7 @@ M:	Alison Schofield <[email protected]>
 M:	Vishal Verma <[email protected]>
 M:	Ira Weiny <[email protected]>
 M:	Dan Williams <[email protected]>
+M:	luzhixing12345 <[email protected]>

lol NAK nice try

Quoted 44 lines
MAINTAINERS +0 -0
 L:	[email protected]
 S:	Maintained
 F:	Documentation/driver-api/cxl
tools/testing/cxl/Kbuild +6 -0
index 3d1ca9e38b1f..8b430274a1ad 100644
@@ -67,6 +67,12 @@ cxl_core-y += config_check.o
 cxl_core-y += cxl_core_test.o
 cxl_core-y += cxl_core_exports.o
 
+obj-m += cxl_region.o
+
+cxl_region-y += $(CXL_CORE_SRC)/region.o
+cxl_region-y += config_check.o
+cxl_region-y += cxl_region_test.o
+
 KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
 
 obj-m += test/
tools/testing/cxl/cxl_region_test.c new file +6 -0
new file mode 100644
index 000000000000..c5859a96e35b
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
+
+#include "watermark.h"
+
+cxl_test_watermark(cxl_region);
tools/testing/cxl/test/cxl.c +1 -0
index 90d5afd52dd0..320aaed2df17 100644
@@ -1304,6 +1304,7 @@ static __init int cxl_test_init(void)
 	cxl_mem_test();
 	cxl_pmem_test();
 	cxl_port_test();
+	cxl_region_test();
 
 	register_cxl_mock_ops(&cxl_mock_ops);