[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0fe95dbe-a7ba-4882-bfff-0197828ee6ba@linux.alibaba.com>
Date: Mon, 20 Oct 2025 21:09:41 +0800
From: Shuai Xue <xueshuai@...ux.alibaba.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, bhelgaas@...gle.com, kbusch@...nel.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, mahesh@...ux.ibm.com,
oohall@...il.com, Jonathan.Cameron@...wei.com, terry.bowman@....com,
tianruidong@...ux.alibaba.com
Subject: Re: [PATCH v6 4/5] PCI/ERR: Use pcie_aer_is_native() to check for
native AER control
在 2025/10/20 18:17, Lukas Wunner 写道:
> On Wed, Oct 15, 2025 at 10:41:58AM +0800, Shuai Xue wrote:
>> Replace the manual checks for native AER control with the
>> pcie_aer_is_native() helper, which provides a more robust way
>> to determine if we have native control of AER.
Hi, Lukas,
Thank you for your question.
>
> Why is it more robust?
IMHO, the pcie_aer_is_native() helper is more robust because it includes
additional safety checks that the manual approach lacks:
int pcie_aer_is_native(struct pci_dev *dev)
{
struct pci_host_bridge *host = pci_find_host_bridge(dev->bus);
if (!dev->aer_cap)
return 0;
return pcie_ports_native || host->native_aer;
}
EXPORT_SYMBOL_NS_GPL(pcie_aer_is_native, "CXL");
Specifically, it performs a sanity check for dev->aer_cap before
evaluating native AER control.
And I think this is more maintainable than manual checks scattered
throughout the code, as the helper encapsulates the exact conditions
required to determine native AER control.
>
> Thanks,
>
> Lukas
Thanks.
Shuai
Powered by blists - more mailing lists