cxl/region: Introduce cxl_pmem_region objects
authorDan Williams <dan.j.williams@intel.com>
Tue, 11 Jan 2022 16:06:40 +0000 (08:06 -0800)
committerDan Williams <dan.j.williams@intel.com>
Tue, 26 Jul 2022 19:23:01 +0000 (12:23 -0700)
commit04ad63f086d1a9649b8b082748cbc7a570ade461
treeb9bfa0e0a44ce367490fbabe100a0ccde8960fc3
parent99183d26ed6191010fca09518dae34d6aff3cd14
cxl/region: Introduce cxl_pmem_region objects

The LIBNVDIMM subsystem is a platform agnostic representation of system
NVDIMM / persistent memory resources. To date, the CXL subsystem's
interaction with LIBNVDIMM has been to register an nvdimm-bridge device
and cxl_nvdimm objects to proxy CXL capabilities into existing LIBNVDIMM
subsystem mechanics.

With regions the approach is the same. Create a new cxl_pmem_region
object to proxy CXL region details into a LIBNVDIMM definition. With
this enabling LIBNVDIMM can partition CXL persistent memory regions with
legacy namespace labels. A follow-on patch will add CXL region label and
CXL namespace label support to persist region configurations across
driver reload / system-reset events.

Co-developed-by: Ben Widawsky <bwidawsk@kernel.org>
Signed-off-by: Ben Widawsky <bwidawsk@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165784340111.1758207.3036498385188290968.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/core.h
drivers/cxl/core/pmem.c
drivers/cxl/core/port.c
drivers/cxl/core/region.c
drivers/cxl/cxl.h
drivers/cxl/pmem.c
drivers/nvdimm/region_devs.c
include/linux/libnvdimm.h