]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/mbox: Add exclusive kernel command support
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 16:07:13 +0000 (09:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:30 +0000 (12:08 -0700)
commit4a199edd83ba0121d721aaee9cc391b4c4d4a764
tree43524542aba6f99931f659bf1fee11dde93cf306
parenta982cbe92c5da4c18790b3bd73489e229f4e6d62
cxl/mbox: Add exclusive kernel command support

The CXL_PMEM driver expects exclusive control of the label storage area
space. Similar to the LIBNVDIMM expectation that the label storage area
is only writable from userspace when the corresponding memory device is
not active in any region, the expectation is the native CXL_PCI UAPI
path is disabled while the cxl_nvdimm for a given cxl_memdev device is
active in LIBNVDIMM.

Add the ability to toggle the availability of a given command for the
UAPI path. Use that new capability to shutdown changes to partitions and
the label storage area while the cxl_nvdimm device is actively proxying
commands for LIBNVDIMM.

Acked-by: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/162982123298.1124374.22718002900700392.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/mbox.c
drivers/cxl/core/memdev.c
drivers/cxl/cxlmem.h
drivers/cxl/pmem.c