[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <696ee3e34f2d9_875d1004f@dwillia2-mobl4.notmuch>
Date: Mon, 19 Jan 2026 18:09:39 -0800
From: <dan.j.williams@...el.com>
To: Terry Bowman <terry.bowman@....com>, <dave@...olabs.net>,
<jonathan.cameron@...wei.com>, <dave.jiang@...el.com>,
<alison.schofield@...el.com>, <dan.j.williams@...el.com>,
<bhelgaas@...gle.com>, <shiju.jose@...wei.com>, <ming.li@...omail.com>,
<Smita.KoralahalliChannabasappa@....com>, <rrichter@....com>,
<dan.carpenter@...aro.org>, <PradeepVineshReddy.Kodamati@....com>,
<lukas@...ner.de>, <Benjamin.Cheatham@....com>,
<sathyanarayanan.kuppuswamy@...ux.intel.com>, <linux-cxl@...r.kernel.org>,
<vishal.l.verma@...el.com>, <alucerop@....com>, <ira.weiny@...el.com>
CC: <linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<terry.bowman@....com>
Subject: Re: [PATCH v14 09/34] PCI/AER: Export
pci_aer_unmask_internal_errors()
Terry Bowman wrote:
> Internal PCIe errors are not enabled by default during initialization. This
> creates a problem for CXL drivers, which rely on PCIe Correctable and
> Uncorrectable Internal Errors to receive CXL protocol error notifications.
>
> Export pci_aer_unmask_internal_errors() so CXL and other drivers can
> enable internal PCIe errors.
I folded in the following to this patch because opening up internal
errors for PCIe drivers in general is not a goal.
1: cb9a15481d8c ! 1: 7433e0204753 PCI/AER: Export pci_aer_unmask_internal_errors()
@@ Metadata
## Commit message ##
PCI/AER: Export pci_aer_unmask_internal_errors()
- Internal PCIe errors are not enabled by default during initialization. This
- creates a problem for CXL drivers, which rely on PCIe Correctable and
- Uncorrectable Internal Errors to receive CXL protocol error notifications.
+ Internal PCIe errors are not enabled by default during initialization
+ because their behavior is too device-specific and there is no standard way
+ to reason about them. However, for CXL an internal error is the standard
+ mechanism for conveying CXL protocol errors.
- Export pci_aer_unmask_internal_errors() so CXL and other drivers can
- enable internal PCIe errors.
+ Export pci_aer_unmask_internal_errors() for CXL, but make it clear that
+ they are only meant for CXL and the status quo for leaving them masked for
+ PCIe in general remains.
Signed-off-by: Terry Bowman <terry.bowman@....com>
Reviewed-by: Dave Jiang <dave.jiang@...el.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
Link: https://patch.msgid.link/20260114182055.46029-10-terry.bowman@amd.com
+ Co-developed-by: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
## include/linux/aer.h ##
@@ drivers/pci/pcie/aer.c: static bool find_source_device(struct pci_dev *parent,
int aer = dev->aer_cap;
u32 mask;
@@ drivers/pci/pcie/aer.c: static void pci_aer_unmask_internal_errors(struct pci_dev *dev)
- mask &= ~PCI_ERR_COR_INTERNAL;
pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, mask);
}
-+EXPORT_SYMBOL_GPL(pci_aer_unmask_internal_errors);
++/*
++ * Internal errors are too device-specific to enable generally, however for CXL
++ * their behavior is standardized for conveying CXL protocol errors.
++ */
++EXPORT_SYMBOL_FOR_MODULES(pci_aer_unmask_internal_errors, "cxl_core");
++
+#ifdef CONFIG_PCIEAER_CXL
static bool is_cxl_mem_dev(struct pci_dev *dev)
{
Powered by blists - more mailing lists