Skip to content

Commit 49f7767

Browse files
skoralahdjbw
authored andcommitted
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: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Robert Richter <rrichter@amd.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20230823234305.27333-3-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 0339dc3 commit 49f7767

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

drivers/pci/pcie/aer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ int pcie_aer_is_native(struct pci_dev *dev)
229229

230230
return pcie_ports_native || host->native_aer;
231231
}
232+
EXPORT_SYMBOL_NS_GPL(pcie_aer_is_native, CXL);
232233

233234
static int pci_enable_pcie_error_reporting(struct pci_dev *dev)
234235
{

drivers/pci/pcie/portdrv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ extern bool pcie_ports_dpc_native;
2929

3030
#ifdef CONFIG_PCIEAER
3131
int pcie_aer_init(void);
32-
int pcie_aer_is_native(struct pci_dev *dev);
3332
#else
3433
static inline int pcie_aer_init(void) { return 0; }
35-
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
3634
#endif
3735

3836
#ifdef CONFIG_HOTPLUG_PCI_PCIE

include/linux/aer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ struct aer_capability_regs {
4242

4343
#if defined(CONFIG_PCIEAER)
4444
int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
45+
int pcie_aer_is_native(struct pci_dev *dev);
4546
#else
4647
static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
4748
{
4849
return -EINVAL;
4950
}
51+
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
5052
#endif
5153

5254
void cper_print_aer(struct pci_dev *dev, int aer_severity,

0 commit comments

Comments
 (0)