tools/testing/cxl: Add partition support
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 May 2022 06:26:11 +0000 (23:26 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 10 Jul 2022 17:29:26 +0000 (10:29 -0700)
commite7ad1bf683295024e7a4e09e41015989a004a0f5
tree20349e44d3a3690e7f26ad47c4c52a3d085f0ac4
parent855c90d30575f95c5a1fb72f9294a9f75dae20c2
tools/testing/cxl: Add partition support

In support of testing DPA allocation mechanisms in the CXL core, the
cxl_test environment needs to support establishing and retrieving the
'pmem partition boundary.

Replace the platform_device_add_resources() method for delineating DPA
within an endpoint with an emulated DEV_SIZE amount of partitionable
capacity. Set DEV_SIZE such that an endpoint has enough capacity to
simultaneously participate in 8 distinct regions.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165603887411.551046.13234212587991192347.stgit@dwillia2-xfh
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/mbox.c
drivers/cxl/cxlmem.h
tools/testing/cxl/test/cxl.c
tools/testing/cxl/test/mem.c