PCI/DOE: Add DOE mailbox support functions
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Jul 2022 20:52:46 +0000 (13:52 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 19 Jul 2022 22:38:04 +0000 (15:38 -0700)
commit9d24322e887b6a3d3f9f9c3e76937a646102c8c1
treef303d60224a2b1794e5b632eb3680c3c94ed2acc
parentb559afd53afed0e04035907e4ec457f28eb4cc40
PCI/DOE: Add DOE mailbox support functions

Introduced in a PCIe r6.0, sec 6.30, DOE provides a config space based
mailbox with standard protocol discovery.  Each mailbox is accessed
through a DOE Extended Capability.

Each DOE mailbox must support the DOE discovery protocol in addition to
any number of additional protocols.

Define core PCIe functionality to manage a single PCIe DOE mailbox at a
defined config space offset.  Functionality includes iterating,
creating, query of supported protocol, and task submission.  Destruction
of the mailboxes is device managed.

Cc: "Li, Ming" <ming4.li@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Acked-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Co-developed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20220719205249.566684-4-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
.clang-format
drivers/pci/Kconfig
drivers/pci/Makefile
drivers/pci/doe.c [new file with mode: 0644]
include/linux/pci-doe.h [new file with mode: 0644]
include/uapi/linux/pci_regs.h