cxl/region: Add volatile region creation support
authorDan Williams <dan.j.williams@intel.com>
Fri, 10 Feb 2023 09:05:57 +0000 (01:05 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 11 Feb 2023 01:32:10 +0000 (17:32 -0800)
commit6e099264185d05f50400ea494f5029264a4fe995
treea7177bc06c801aa30d8477f5ea735dc3a4a2fbe0
parent1b9b7a6fd618239db47a83da39dff9e725a5865a
cxl/region: Add volatile region creation support

Expand the region creation infrastructure to enable 'ram'
(volatile-memory) regions. The internals of create_pmem_region_store()
and create_pmem_region_show() are factored out into helpers
__create_region() and __create_region_show() for the 'ram' case to
reuse.

Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Reviewed-by: Gregory Price <gregory.price@memverge.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Fan Ni <fan.ni@samsung.com>
Link: https://lore.kernel.org/r/167601995775.1924368.352616146815830591.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-bus-cxl
drivers/cxl/core/core.h
drivers/cxl/core/port.c
drivers/cxl/core/region.c