]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools/testing/cxl: Introduce a mock memory device + driver
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 16:07:49 +0000 (09:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:31 +0000 (12:08 -0700)
commitcf745ca94024300c9148192f4a2089e6957fc665
treee8e8c79045539a337dbe98f49daeed8ed63e289f
parent99f58e7086fe93ff6fe9b84728a929396729d913
tools/testing/cxl: Introduce a mock memory device + driver

Introduce an emulated device-set plus driver to register CXL memory
devices, 'struct cxl_memdev' instances, in the mock cxl_test topology.
This enables the development of HDM Decoder (Host-managed Device Memory
Decoder) programming flow (region provisioning) in an environment that
can be updated alongside the kernel as it gains more functionality.

Whereas the cxl_pci module looks for CXL memory expanders on the 'pci'
bus, the cxl_mock_mem module attaches to CXL expanders on the platform
bus emitted by cxl_test.

Acked-by: Ben Widawsky <ben.widawsky@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/162982126962.1124374.4032057539749435582.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pmem.c
drivers/cxl/cxl.h
drivers/cxl/pmem.c
tools/testing/cxl/Kbuild
tools/testing/cxl/mock_pmem.c [new file with mode: 0644]
tools/testing/cxl/test/Kbuild
tools/testing/cxl/test/cxl.c
tools/testing/cxl/test/mem.c [new file with mode: 0644]