linux/drivers/cxl
Ben Widawsky 560f785590 cxl/pci: Retrieve CXL DVSEC memory info
Before CXL 2.0 HDM Decoder Capability mechanisms can be utilized in a
device the driver must determine that the device is ready for CXL.mem
operation and that platform firmware, or some other agent, has
established an active decode via the legacy CXL 1.1 decoder mechanism.

This legacy mechanism is defined in the CXL DVSEC as a set of range
registers and status bits that take time to settle after a reset.

Validate the CXL memory decode setup via the DVSEC and cache it for
later consideration by the cxl_mem driver (to be added). Failure to
validate is not fatal to the cxl_pci driver since that is only providing
CXL command support over PCI.mmio, and might be needed to rectify CXL
DVSEC validation problems.

Any potential ranges that the device is already claiming via DVSEC need
to be reconciled with the dynamic provisioning ranges provided by
platform firmware (like ACPI CEDT.CFMWS). Leave that reconciliation to
the cxl_mem driver.

[djbw: shorten defines]
[djbw: change precise spin wait to generous msleep]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
[djbw: clarify changelog]
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/164375911821.559935.7375160041663453400.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-02-08 22:57:31 -08:00
..
core cxl/core/port: Remove @host argument for dport + decoder enumeration 2022-02-08 22:57:30 -08:00
acpi.c cxl/core/port: Remove @host argument for dport + decoder enumeration 2022-02-08 22:57:30 -08:00
cxl.h cxl/core/port: Remove @host argument for dport + decoder enumeration 2022-02-08 22:57:30 -08:00
cxlmem.h cxl/pci: Retrieve CXL DVSEC memory info 2022-02-08 22:57:31 -08:00
cxlpci.h cxl/pci: Retrieve CXL DVSEC memory info 2022-02-08 22:57:31 -08:00
Kconfig cxl/port: Add a driver for 'struct cxl_port' objects 2022-02-08 22:57:30 -08:00
Makefile cxl/port: Add a driver for 'struct cxl_port' objects 2022-02-08 22:57:30 -08:00
pci.c cxl/pci: Retrieve CXL DVSEC memory info 2022-02-08 22:57:31 -08:00
pmem.c cxl: Prove CXL locking 2022-02-08 22:57:29 -08:00
port.c cxl/core/port: Remove @host argument for dport + decoder enumeration 2022-02-08 22:57:30 -08:00