OpenCloudOS-Kernel/Documentation/driver-api
Ben Widawsky 54cdbf845c cxl/port: Add a driver for 'struct cxl_port' objects
The need for a CXL port driver and a dedicated cxl_bus_type is driven by
a need to simultaneously support 2 independent physical memory decode
domains (cache coherent CXL.mem and uncached PCI.mmio) that also
intersect at a single PCIe device node. A CXL Port is a device that
advertises a  CXL Component Register block with an "HDM Decoder
Capability Structure".

>From Documentation/driver-api/cxl/memory-devices.rst:

    Similar to how a RAID driver takes disk objects and assembles them into
    a new logical device, the CXL subsystem is tasked to take PCIe and ACPI
    objects and assemble them into a CXL.mem decode topology. The need for
    runtime configuration of the CXL.mem topology is also similar to RAID in
    that different environments with the same hardware configuration may
    decide to assemble the topology in contrasting ways. One may choose
    performance (RAID0) striping memory across multiple Host Bridges and
    endpoints while another may opt for fault tolerance and disable any
    striping in the CXL.mem topology.

The port driver identifies whether an endpoint Memory Expander is
connected to a CXL topology. If an active (bound to the 'cxl_port'
driver) CXL Port is not found at every PCIe Switch Upstream port and an
active "root" CXL Port then the device is just a plain PCIe endpoint
only capable of participating in PCI.mmio and DMA cycles, not CXL.mem
coherent interleave sets.

The 'cxl_port' driver lets the CXL subsystem leverage driver-core
infrastructure for setup and teardown of register resources and
communicating device activation status to userspace. The cxl_bus_type
can rendezvous the async arrival of platform level CXL resources (via
the 'cxl_acpi' driver) with the asynchronous enumeration of Memory
Expander endpoints, while also implementing a hierarchical locking model
independent of the associated 'struct pci_dev' locking model. The
locking for dport and decoder enumeration is now handled in the core
rather than callers.

For now the port driver only enumerates and registers CXL resources
(downstream port metadata and decoder resources) later it will be used
to take action on its decoders in response to CXL.mem region
provisioning requests.

Note1: cxlpci.h has long depended on pci.h, but port.c was the first to
not include pci.h. Carry that dependency in cxlpci.h.

Note2: cxl port enumeration and probing complicates CXL subsystem init
to the point that it helps to have centralized debug logging of probe
events in cxl_bus_probe().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Co-developed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/164374948116.464348.1772618057599155408.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-02-08 22:57:30 -08:00
..
80211 docs: net: 80211: reduce docs build time 2020-10-08 10:41:49 +02:00
acpi Documentation: ACPI: fix error script name 2021-06-17 13:21:48 -06:00
backlight docs: lp855x-driver.rst: add it to the driver-api book 2019-07-15 11:03:02 -03:00
cxl cxl/port: Add a driver for 'struct cxl_port' objects 2022-02-08 22:57:30 -08:00
dmaengine Documentation: dmaengine: Correctly describe dmatest with channel unset 2021-11-22 12:31:00 +05:30
driver-model iio: inkern: introduce devm_iio_map_array_register() short-hand function 2021-10-19 08:27:34 +01:00
early-userspace Documentation: Fix intiramfs script name 2021-07-18 23:48:14 +09:00
firmware docs: driver-api: firmware: fallback-mechanisms: Fix rendering of bullet point 2020-09-08 13:32:06 +02:00
fpga fpga: region: Use standard dev_release for class driver 2021-11-28 14:02:41 -08:00
gpio docs: gpio: explain GPIOD_OUT_* values and toggling active low 2021-07-21 15:21:36 +02:00
i3c docs: driver-api: i3c: Replace HTTP links with HTTPS ones 2020-07-13 09:32:36 -06:00
iio docs: iio: mark "repeat" sysfs attribute as optional 2021-03-11 20:47:08 +00:00
md docs: add SPDX tags to new index files 2019-07-15 11:03:03 -03:00
media media: drivers/index.rst: add missing rkisp1 entry 2021-11-15 08:12:04 +00:00
mei docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
memory-devices Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
mmc docs: mmc: update maintainer name and URL 2021-10-28 11:54:54 +02:00
mtd MTD core: 2020-12-16 14:58:35 -08:00
nfc nfc: constify nfc_llc_ops 2021-07-25 09:21:21 +01:00
nvdimm MAINTAINERS: Move nvdimm mailing list 2021-05-12 12:37:15 -07:00
pci PCI/MSI: Move code into a separate directory 2021-12-09 11:52:22 +01:00
phy docs: phy: Drop duplicate 'be made' 2019-07-26 08:15:26 -06:00
pldmfw Add pldmfw library for PLDM firmware update 2020-07-28 17:07:06 -07:00
pm docs: devices.rst: better reference documentation docs 2021-06-17 13:24:36 -06:00
rapidio Replace HTTP links with HTTPS ones: Documentation/driver-api 2020-06-26 11:09:04 -06:00
serial docs/driver-api: Replace a comma in the n_gsm.rst with a double colon 2021-12-21 10:18:36 +01:00
soundwire docs: soundwire: fix some identation at stream.rst 2020-09-10 10:49:29 -06:00
surface_aggregator platform-drivers-x86 for v5.14-1 2021-06-30 11:15:39 -07:00
thermal thermal: Move ABI documentation to Documentation/ABI 2021-10-07 19:25:47 +02:00
usb Docs: usb: update writesize, copy_from_user, usb_fill_bulk_urb, usb_submit_urb 2021-11-17 14:54:58 +01:00
xilinx firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) 2021-03-01 12:52:07 +01:00
auxiliary_bus.rst Documentation/auxiliary_bus: Move the text into the code 2021-12-03 16:41:50 +01:00
basics.rst docs: basics.rst: avoid duplicated C function declaration 2020-10-15 07:49:45 +02:00
clk.rst docs: clk: fix struct syntax 2019-06-07 11:35:15 -06:00
component.rst
connector.rst net/connector: Add const qualifier to cb_id 2020-12-16 11:06:49 -08:00
console.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
dcdbas.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
devfreq.rst docs: Add initial documentation for devfreq 2019-11-19 13:16:53 -07:00
device-io.rst docs: driver-api: device-io: Document ioremap() variants & access funcs 2021-04-08 20:18:38 +09:00
device_link.rst docs: device_link.rst: remove duplicated kernel-doc include 2020-10-15 07:49:42 +02:00
dma-buf.rst dma-buf: cleanup kerneldoc of removed component 2021-09-02 13:14:40 +02:00
edac.rst
eisa.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
firewire.rst Documentation: fix firewire.rst ABI file path error 2022-01-20 17:01:32 -07:00
frame-buffer.rst
generic-counter.rst counter: Update documentation for new counter registration functions 2021-12-30 17:44:06 +01:00
hsi.rst
i2c.rst
index.rst remove the lightnvm subsystem 2021-08-14 15:54:09 -06:00
infiniband.rst RDMA/core: Remove FMR pool API 2020-06-02 20:32:53 -03:00
infrastructure.rst docs: infrastructure.rst: exclude device_link_state from device.h 2020-10-15 07:49:46 +02:00
input.rst Input: remove input_polled_dev implementation 2020-12-02 12:35:14 -08:00
interconnect.rst interconnect: Add interconnect_graph file to debugfs 2019-12-16 09:49:54 +02:00
io-mapping.rst io-mapping: Provide iomap_local variant 2020-11-24 14:42:09 +01:00
io_ordering.rst Documentation: Add io_ordering.rst to driver-api manual 2020-03-10 11:33:19 -06:00
ioctl.rst docs: driver-api: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:37 -06:00
ipmb.rst drivers: ipmi: Support raw i2c packet in IPMB 2019-12-11 13:21:36 -06:00
ipmi.rst ipmi: Add docs for the IPMI IPMB driver 2021-10-05 06:54:17 -05:00
isa.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
isapnp.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
libata.rst docs: libata.rst: fix a wrong usage of :c:type: tag 2020-10-15 07:49:44 +02:00
mailbox.rst docs: move mailbox.txt to driver-api and rename it 2020-06-26 11:33:38 -06:00
men-chameleon-bus.rst Documentation: document dma device use for mcb 2021-01-11 13:26:13 -07:00
message-based.rst
misc_devices.rst
miscellaneous.rst
mtdnand.rst docs: mtd: Avoid htmldocs warnings 2020-12-10 22:37:32 +01:00
ntb.rst Documentation/driver-api: ntb: drop doubled word 2020-07-13 11:18:17 -06:00
nvmem.rst nvmem: core: add nvmem_device_find 2019-10-07 09:47:37 -07:00
parport-lowlevel.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
pin-control.rst docs/pinctrl: fix the reference to the u300 platform 2021-05-28 02:59:40 +02:00
pps.rst docs: driver-api: add remaining converted dirs to it 2019-07-15 11:03:03 -03:00
ptp.rst docs: ptp.rst: add support for Renesas (IDT) ClockMatrix 2020-07-17 10:25:21 -07:00
pwm.rst pwm: core: Remove unused devm_pwm_put() 2021-06-30 19:12:19 +02:00
regulator.rst docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
reset.rst docs: add a reset controller chapter to the driver API docs 2020-12-08 10:48:04 -07:00
rfkill.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
s390-drivers.rst docs: s390: convert docs to ReST and rename to *.rst 2019-06-11 09:48:14 +02:00
scsi.rst
slimbus.rst
sm501.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
spi.rst
switchtec.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
sync_file.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
target.rst docs: scsi: target.rst: remove iSCSI transport class kernel-doc markup 2020-10-15 07:49:42 +02:00
uio-howto.rst Documentation/driver-api: uio-howto: drop doubled word 2020-07-10 14:58:01 +02:00
vfio-mediated-device.rst vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind 2021-06-21 15:29:25 -06:00
vfio.rst vfio: Introduce a vfio_uninit_group_dev() API call 2021-08-11 09:50:10 -06:00
vme.rst
w1.rst docs: driver-api: address duplicate label warning 2020-04-07 13:41:34 -06:00
xillybus.rst Documentation/driver-api: xillybus: drop doubled word 2020-07-10 14:58:01 +02:00
zorro.rst docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00