linux/drivers/cxl
Robert Richter 733b57f262 cxl/pci: Early setup RCH dport component registers from RCRB
CXL RAS capabilities must be enabled and accessible as soon as the CXL
endpoint is detected in the PCI hierarchy and bound to the cxl_pci
driver. This needs to be independent of other modules such as cxl_port
or cxl_mem.

CXL RAS capabilities reside in the Component Registers. For an RCH
this is determined by probing RCRB which is implemented very late once
the CXL Memory Device is created.

Change this by moving the RCRB probe to the cxl_pci driver. Do this by
using a new introduced function cxl_pci_find_port() similar to
cxl_mem_find_port() to determine the involved dport by the endpoint's
PCI handle. Plug this into the existing cxl_pci_setup_regs() function
to setup Component Registers. Probe the RCRB in case the Component
Registers cannot be located through the CXL Register Locator
capability.

This unifies code and early sets up the Component Registers at the
same time for both, VH and RCH mode. Only the cxl_pci driver is
involved for this. This allows an early mapping of the CXL RAS
capability registers.

Signed-off-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230622205523.85375-14-terry.bowman@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2023-06-25 11:57:11 -07:00
..
core cxl/pci: Early setup RCH dport component registers from RCRB 2023-06-25 11:57:11 -07:00
acpi.c cxl/acpi: Directly bind the CEDT detected CHBCR to the Host Bridge's port 2023-06-25 11:41:45 -07:00
cxl.h cxl/pci: Early setup RCH dport component registers from RCRB 2023-06-25 11:57:11 -07:00
cxlmem.h cxl: Rename 'uport' to 'uport_dev' 2023-06-25 11:37:54 -07:00
cxlpci.h cxl: Wait Memory_Info_Valid before access memory related info 2023-05-18 16:42:41 -07:00
Kconfig Merge branch 'for-6.3/cxl-ram-region' into cxl/next 2023-02-10 18:11:01 -08:00
Makefile cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation 2022-11-30 16:30:47 -08:00
mem.c cxl/pci: Early setup RCH dport component registers from RCRB 2023-06-25 11:57:11 -07:00
pci.c cxl/pci: Early setup RCH dport component registers from RCRB 2023-06-25 11:57:11 -07:00
pmem.c cxl/pmem: Fix nvdimm registration races 2023-02-13 17:01:05 -08:00
port.c cxl/regs: Remove early capability checks in Component Register setup 2023-06-25 11:51:36 -07:00
security.c cxl/mbox: Enable cxl_mbox_send_cmd() users to validate output size 2022-12-06 14:36:02 -08:00