Skip to content

Commit

Permalink
PCI/AER: Export pcie_aer_is_native()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Smita Koralahalli authored and Dan Williams committed Sep 11, 2023
1 parent 0339dc3 commit 49f7767
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/pci/pcie/aer.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ int pcie_aer_is_native(struct pci_dev *dev)

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)
{
Expand Down
2 changes: 0 additions & 2 deletions drivers/pci/pcie/portdrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ extern bool pcie_ports_dpc_native;

#ifdef CONFIG_PCIEAER
int pcie_aer_init(void);
int pcie_aer_is_native(struct pci_dev *dev);
#else
static inline int pcie_aer_init(void) { return 0; }
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
#endif

#ifdef CONFIG_HOTPLUG_PCI_PCIE
Expand Down
2 changes: 2 additions & 0 deletions include/linux/aer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ struct aer_capability_regs {

#if defined(CONFIG_PCIEAER)
int pci_aer_clear_nonfatal_status(struct pci_dev *dev);
int pcie_aer_is_native(struct pci_dev *dev);
#else
static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev)
{
return -EINVAL;
}
static inline int pcie_aer_is_native(struct pci_dev *dev) { return 0; }
#endif

void cper_print_aer(struct pci_dev *dev, int aer_severity,
Expand Down

0 comments on commit 49f7767

Please sign in to comment.