Skip to content

Commit 914c743

Browse files
committed
Merge branch 'for-7.0/cxl-aer-prep' into cxl-for-next
Preparation for CXL port error protocol handling. First part contains all the changes centered around setting up the PCI side of error handling. cxl: Update RAS handler interfaces to also support CXL Ports cxl/mem: Clarify @host for devm_cxl_add_nvdimm() PCI/AER: Update struct aer_err_info with kernel-doc formatting PCI/AER: Report CXL or PCIe bus type in AER trace logging PCI/AER: Use guard() in cxl_rch_handle_error_iter() PCI/AER: Move CXL RCH error handling to aer_cxl_rch.c PCI/AER: Update is_internal_error() to be non-static is_aer_internal_error() PCI/AER: Export pci_aer_unmask_internal_errors() cxl/pci: Move CXL driver's RCH error handling into core/ras_rch.c PCI/AER: Replace PCIEAER_CXL symbol with CXL_RAS cxl/pci: Remove CXL VH handling in CONFIG_PCIEAER_CXL conditional blocks from core/pci.c PCI: Replace cxl_error_is_native() with pcie_aer_is_native() cxl/pci: Remove unnecessary CXL RCH handling helper functions cxl/pci: Remove unnecessary CXL Endpoint handling helper functions PCI: Introduce pcie_is_cxl() PCI: Update CXL DVSEC definitions PCI: Move CXL DVSEC definitions into uapi/linux/pci_regs.h
2 parents 064c098 + 9a8920c commit 914c743

24 files changed

Lines changed: 666 additions & 565 deletions

File tree

drivers/cxl/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,8 @@ config CXL_MCE
233233
def_bool y
234234
depends on X86_MCE && MEMORY_FAILURE
235235

236+
config CXL_RAS
237+
def_bool y
238+
depends on ACPI_APEI_GHES && PCIEAER && CXL_BUS
239+
236240
endif

drivers/cxl/core/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ cxl_core-y += pci.o
1414
cxl_core-y += hdm.o
1515
cxl_core-y += pmu.o
1616
cxl_core-y += cdat.o
17-
cxl_core-y += ras.o
1817
cxl_core-$(CONFIG_TRACING) += trace.o
1918
cxl_core-$(CONFIG_CXL_REGION) += region.o
2019
cxl_core-$(CONFIG_CXL_MCE) += mce.o
2120
cxl_core-$(CONFIG_CXL_FEATURES) += features.o
2221
cxl_core-$(CONFIG_CXL_EDAC_MEM_FEATURES) += edac.o
22+
cxl_core-$(CONFIG_CXL_RAS) += ras.o
23+
cxl_core-$(CONFIG_CXL_RAS) += ras_rch.o

drivers/cxl/core/core.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,30 @@ int cxl_pci_get_bandwidth(struct pci_dev *pdev, struct access_coordinate *c);
144144
int cxl_port_get_switch_dport_bandwidth(struct cxl_port *port,
145145
struct access_coordinate *c);
146146

147+
#ifdef CONFIG_CXL_RAS
147148
int cxl_ras_init(void);
148149
void cxl_ras_exit(void);
150+
bool cxl_handle_ras(struct device *dev, void __iomem *ras_base);
151+
void cxl_handle_cor_ras(struct device *dev, void __iomem *ras_base);
152+
void cxl_dport_map_rch_aer(struct cxl_dport *dport);
153+
void cxl_disable_rch_root_ints(struct cxl_dport *dport);
154+
void cxl_handle_rdport_errors(struct cxl_dev_state *cxlds);
155+
#else
156+
static inline int cxl_ras_init(void)
157+
{
158+
return 0;
159+
}
160+
static inline void cxl_ras_exit(void) { }
161+
static inline bool cxl_handle_ras(struct device *dev, void __iomem *ras_base)
162+
{
163+
return false;
164+
}
165+
static inline void cxl_handle_cor_ras(struct device *dev, void __iomem *ras_base) { }
166+
static inline void cxl_dport_map_rch_aer(struct cxl_dport *dport) { }
167+
static inline void cxl_disable_rch_root_ints(struct cxl_dport *dport) { }
168+
static inline void cxl_handle_rdport_errors(struct cxl_dev_state *cxlds) { }
169+
#endif /* CONFIG_CXL_RAS */
170+
149171
int cxl_gpf_port_setup(struct cxl_dport *dport);
150172

151173
struct cxl_hdm;

0 commit comments

Comments
 (0)