Skip to content

Commit 51ce56b

Browse files
ktbowmandavejiang
authored andcommitted
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>
1 parent 6dc5fe2 commit 51ce56b

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

drivers/pci/pcie/aer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ static bool is_cxl_mem_dev(struct pci_dev *dev)
11711171
return true;
11721172
}
11731173

1174-
static bool is_internal_error(struct aer_err_info *info)
1174+
bool is_aer_internal_error(struct aer_err_info *info)
11751175
{
11761176
if (info->severity == AER_CORRECTABLE)
11771177
return info->status & PCI_ERR_COR_INTERNAL;
@@ -1216,7 +1216,7 @@ static void cxl_rch_handle_error(struct pci_dev *dev, struct aer_err_info *info)
12161216
* device driver.
12171217
*/
12181218
if (pci_pcie_type(dev) == PCI_EXP_TYPE_RC_EC &&
1219-
is_internal_error(info))
1219+
is_aer_internal_error(info))
12201220
pcie_walk_rcec(dev, cxl_rch_handle_error_iter, info);
12211221
}
12221222

drivers/pci/pcie/portdrv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,13 @@ static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {}
123123
#endif /* !CONFIG_PCIE_PME */
124124

125125
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+
126135
#endif /* _PORTDRV_H_ */

0 commit comments

Comments
 (0)