[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aK66OcdL4Meb0wFt@wunner.de>
Date: Wed, 27 Aug 2025 09:56:41 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Terry Bowman <terry.bowman@....com>
Cc: 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,
Benjamin.Cheatham@....com,
sathyanarayanan.kuppuswamy@...ux.intel.com,
linux-cxl@...r.kernel.org, alucerop@....com, ira.weiny@...el.com,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v11 17/23] CXL/AER: Introduce cxl_aer.c into AER driver
for forwarding CXL errors
On Tue, Aug 26, 2025 at 08:35:32PM -0500, Terry Bowman wrote:
> +++ b/drivers/pci/pcie/aer.c
> @@ -1092,51 +1092,6 @@ static bool find_source_device(struct pci_dev *parent,
> return true;
> }
>
> -#ifdef CONFIG_CXL_RAS
> -
> -/**
> - * pci_aer_unmask_internal_errors - unmask internal errors
> - * @dev: pointer to the pci_dev data structure
> - *
> - * Unmask internal errors in the Uncorrectable and Correctable Error
> - * Mask registers.
> - *
> - * Note: AER must be enabled and supported by the device which must be
> - * checked in advance, e.g. with pcie_aer_is_native().
> - */
> -void pci_aer_unmask_internal_errors(struct pci_dev *dev)
> -{
> - int aer = dev->aer_cap;
> - u32 mask;
> -
> - pci_read_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, &mask);
> - mask &= ~PCI_ERR_UNC_INTN;
> - pci_write_config_dword(dev, aer + PCI_ERR_UNCOR_MASK, mask);
> -
> - pci_read_config_dword(dev, aer + PCI_ERR_COR_MASK, &mask);
> - mask &= ~PCI_ERR_COR_INTERNAL;
> - pci_write_config_dword(dev, aer + PCI_ERR_COR_MASK, mask);
> -}
> -EXPORT_SYMBOL_NS_GPL(pci_aer_unmask_internal_errors, "CXL");
PCI device drivers may have a need to unmask internal errors if they know
that the device is capable of signaling them and their pci_error_handlers
can take care of them.
Hence I'm in favor of keeping pci_aer_unmask_internal_errors() as a helper
in drivers/pci/pcie/aer.c which PCI device drivers may call.
In particular, the "xe" driver would be a potential future user of this
helper.
Thanks,
Lukas
Powered by blists - more mailing lists