Commit 49f77672 authored by Smita Koralahalli's avatar Smita Koralahalli Committed by Dan Williams

PCI/AER: Export pcie_aer_is_native()

Export and move the declaration of pcie_aer_is_native() to a common header
file to be reused by cxl/pci module.
Signed-off-by: default avatarSmita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: default avatarRobert Richter <rrichter@amd.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230823234305.27333-3-Smita.KoralahalliChannabasappa@amd.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 0339dc39
...@@ -229,6 +229,7 @@ int pcie_aer_is_native(struct pci_dev *dev) ...@@ -229,6 +229,7 @@ int pcie_aer_is_native(struct pci_dev *dev)
return pcie_ports_native || host->native_aer; return pcie_ports_native || host->native_aer;
} }
EXPORT_SYMBOL_NS_GPL(pcie_aer_is_native, CXL);
static int pci_enable_pcie_error_reporting(struct pci_dev *dev) static int pci_enable_pcie_error_reporting(struct pci_dev *dev)
{ {
......
...@@ -29,10 +29,8 @@ extern bool pcie_ports_dpc_native; ...@@ -29,10 +29,8 @@ extern bool pcie_ports_dpc_native;
#ifdef CONFIG_PCIEAER #ifdef CONFIG_PCIEAER
int pcie_aer_init(void); int pcie_aer_init(void);
int pcie_aer_is_native(struct pci_dev *dev);
#else #else
static inline int pcie_aer_init(void) { return 0; } static inline int pcie_aer_init(void) { return 0; }
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
#endif #endif
#ifdef CONFIG_HOTPLUG_PCI_PCIE #ifdef CONFIG_HOTPLUG_PCI_PCIE
......
...@@ -42,11 +42,13 @@ struct aer_capability_regs { ...@@ -42,11 +42,13 @@ struct aer_capability_regs {
#if defined(CONFIG_PCIEAER) #if defined(CONFIG_PCIEAER)
int pci_aer_clear_nonfatal_status(struct pci_dev *dev); int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
int pcie_aer_is_native(struct pci_dev *dev);
#else #else
static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev) static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
{ {
return -EINVAL; return -EINVAL;
} }
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
#endif #endif
void cper_print_aer(struct pci_dev *dev, int aer_severity, void cper_print_aer(struct pci_dev *dev, int aer_severity,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment