Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI/AER: Update is_internal_error() to be non-static is_aer_internal_error()

The AER driver includes significant logic for handling CXL protocol errors.
The AER driver will be updated in the future to separate the AER and CXL
logic.

Rename the is_internal_error() function to is_aer_internal_error() as it
gives a more precise indication of the purpose. Make
is_aer_internal_error() non-static to allow for the 2 different CXL
topology error model implementations (RCH and VH) to share this helper.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Link: https://patch.msgid.link/20260114182055.46029-11-terry.bowman@amd.com
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>

authored by

Terry Bowman and committed by
Dave Jiang
51ce56b1 6dc5fe21

+11 -2
+2 -2
drivers/pci/pcie/aer.c
··· 1171 1171 return true; 1172 1172 } 1173 1173 1174 - static bool is_internal_error(struct aer_err_info *info) 1174 + bool is_aer_internal_error(struct aer_err_info *info) 1175 1175 { 1176 1176 if (info->severity == AER_CORRECTABLE) 1177 1177 return info->status & PCI_ERR_COR_INTERNAL; ··· 1216 1216 * device driver. 1217 1217 */ 1218 1218 if (pci_pcie_type(dev) == PCI_EXP_TYPE_RC_EC && 1219 - is_internal_error(info)) 1219 + is_aer_internal_error(info)) 1220 1220 pcie_walk_rcec(dev, cxl_rch_handle_error_iter, info); 1221 1221 } 1222 1222
+9
drivers/pci/pcie/portdrv.h
··· 123 123 #endif /* !CONFIG_PCIE_PME */ 124 124 125 125 struct device *pcie_port_find_device(struct pci_dev *dev, u32 service); 126 + 127 + struct aer_err_info; 128 + 129 + #ifdef CONFIG_PCIEAER_CXL 130 + bool is_aer_internal_error(struct aer_err_info *info); 131 + #else 132 + static inline bool is_aer_internal_error(struct aer_err_info *info) { return false; } 133 + #endif /* CONFIG_PCIEAER_CXL */ 134 + 126 135 #endif /* _PORTDRV_H_ */