diff options
author | Dan Williams <dan.j.williams@intel.com> | 2021-09-08 22:12:32 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-09-21 13:44:56 -0700 |
commit | 4faf31b43468c58e2c8c91cc5fa26f08a6b733be (patch) | |
tree | d22c687ae4d125396c41034f9bd2e4dceb0af3a0 /drivers/cxl/core/bus.c | |
parent | 4cb35f1ca05a42acbc4a3c8cf7de1029a06558d0 (diff) | |
download | linux-4faf31b43468c58e2c8c91cc5fa26f08a6b733be.tar.gz linux-4faf31b43468c58e2c8c91cc5fa26f08a6b733be.tar.bz2 linux-4faf31b43468c58e2c8c91cc5fa26f08a6b733be.zip |
cxl/mbox: Move mailbox and other non-PCI specific infrastructure to the core
Now that the internals of mailbox operations are abstracted from the PCI
specifics a bulk of infrastructure can move to the core.
The CXL_PMEM driver intends to proxy LIBNVDIMM UAPI and driver requests
to the equivalent functionality provided by the CXL hardware mailbox
interface. In support of that intent move the mailbox implementation to
a shared location for the CXL_PCI driver native IOCTL path and CXL_PMEM
nvdimm command proxy path to share.
A unit test framework seeks to implement a unit test backend transport
for mailbox commands to communicate mocked up payloads. It can reuse all
of the mailbox infrastructure minus the PCI specifics, so that also gets
moved to the core.
Finally with the mailbox infrastructure and ioctl handling being
transport generic there is no longer any need to pass file
file_operations to devm_cxl_add_memdev(). That allows all the ioctl
boilerplate to move into the core for unit test reuse.
No functional change intended, just code movement.
Acked-by: Ben Widawsky <ben.widawsky@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/163116435233.2460985.16197340449713287180.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/core/bus.c')
-rw-r--r-- | drivers/cxl/core/bus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cxl/core/bus.c b/drivers/cxl/core/bus.c index 267d8042bec2..9a8fa88b634c 100644 --- a/drivers/cxl/core/bus.c +++ b/drivers/cxl/core/bus.c @@ -635,6 +635,8 @@ static __init int cxl_core_init(void) { int rc; + cxl_mbox_init(); + rc = cxl_memdev_init(); if (rc) return rc; @@ -646,6 +648,7 @@ static __init int cxl_core_init(void) err: cxl_memdev_exit(); + cxl_mbox_exit(); return rc; } @@ -653,6 +656,7 @@ static void cxl_core_exit(void) { bus_unregister(&cxl_bus_type); cxl_memdev_exit(); + cxl_mbox_exit(); } module_init(cxl_core_init); |