]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/mbox: Move mailbox and other non-PCI specific infrastructure to the core
authorDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 16:06:57 +0000 (09:06 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 24 Aug 2021 19:08:30 +0000 (12:08 -0700)
commitbd0964c858ec515d299e37b0f26e311aad2feea1
tree8fcbf6d2fb691a104634b286390d5a0b4e05301b
parent55e2f3e33b1334830467cb3e5852cdd131d7387c
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>
Link: https://lore.kernel.org/r/162982121720.1124374.4630115550776741892.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/driver-api/cxl/memory-devices.rst
drivers/cxl/core/Makefile
drivers/cxl/core/bus.c
drivers/cxl/core/core.h
drivers/cxl/core/mbox.c [new file with mode: 0644]
drivers/cxl/core/memdev.c
drivers/cxl/cxlmem.h
drivers/cxl/pci.c