cxl/region: Add region driver boiler plate
authorDan Williams <dan.j.williams@intel.com>
Tue, 15 Jun 2021 21:00:40 +0000 (14:00 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 26 Jul 2022 19:23:01 +0000 (12:23 -0700)
commit8d48817df6ac2049955b6b3a4f1b68dbe5b31f1b
treebe842cf5e695b50fc7fd6fa3e774fbebc97a2beb
parent176baefb2eb5d7a3ddebe3ff803db1fce44574b5
cxl/region: Add region driver boiler plate

The CXL region driver is responsible for routing fully formed CXL
regions to one of libnvdimm, for persistent memory regions, device-dax
for volatile memory regions, or just act as an enumeration placeholder
if the region was setup and configuration locked by platform firmware.
In the platform-firmware-setup case the expectation is that region is
already accounted in the system memory map, i.e. already enabled as
"System RAM".

For now, just attach to CXL regions in the CXL_CONFIG_COMMIT state, and
take no further action.

Given this driver is just a small / simple router, include it in the
core rather than its own module.

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/20220624041950.559155-18-dan.j.williams@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/core.h
drivers/cxl/core/port.c
drivers/cxl/core/region.c
drivers/cxl/cxl.h