cxl/pci: Map RCH downstream AER registers for logging protocol errors
authorTerry Bowman <terry.bowman@amd.com>
Wed, 18 Oct 2023 17:17:07 +0000 (19:17 +0200)
committerDan Williams <dan.j.williams@intel.com>
Sat, 28 Oct 2023 03:13:38 +0000 (20:13 -0700)
commit6c5f3aacb2963d49a11d4f8accb1188db6a6404b
tree182bd125b34e68c8b3733ef06d274b8f56ae237a
parentbf6c9fa846e2a0f7db2a2eabd52ad4f8d4335bcb
cxl/pci: Map RCH downstream AER registers for logging protocol errors

The restricted CXL host (RCH) error handler will log protocol errors
using AER and RAS status registers. The AER and RAS registers need to
be virtually memory mapped before enabling interrupts. Create the
initializer function devm_cxl_setup_parent_dport() for this when the
endpoint is connected with the dport. The initialization sets up the
RCH RAS and AER mappings.

Add 'struct cxl_regs' to 'struct cxl_dport' for saving a pointer to
the RCH downstream port's AER and RAS registers.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Co-developed-by: Robert Richter <rrichter@amd.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20231018171713.1883517-15-rrichter@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pci.c
drivers/cxl/cxl.h