From: Hans Zhang <18255117159@163.com>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@linux.intel.com>,
bhelgaas@google.com, tglx@linutronix.de, kw@linux.com,
manivannan.sadhasivam@linaro.org, mahesh@linux.ibm.com
Cc: oohall@gmail.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Hans Zhang <hans.zhang@cixtech.com>
Subject: Re: [PATCH 3/4] PCI/AER: Expose AER panic state via pci_aer_panic_enabled()
Date: Mon, 19 May 2025 22:03:25 +0800 [thread overview]
Message-ID: <f3033cfb-6a70-4fa3-bf06-ee79517ef740@163.com> (raw)
In-Reply-To: <6d946767-aa61-441d-965b-115e415bfd4f@linux.intel.com>
On 2025/5/17 12:07, Sathyanarayanan Kuppuswamy wrote:
>
> On 5/16/25 9:55 AM, Hans Zhang wrote:
>> From: Hans Zhang <hans.zhang@cixtech.com>
>>
>> Add pci_aer_panic_enabled() to check if aer_panic is enabled system-wide.
>> Export the function for use in error recovery logic.
>>
>> Signed-off-by: Hans Zhang <hans.zhang@cixtech.com>
>> ---
>> drivers/pci/pci.h | 2 ++
>> drivers/pci/pcie/aer.c | 12 ++++++++++++
>> 2 files changed, 14 insertions(+)
>>
>> diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
>> index 8ddfc1677eeb..f92928dadc6a 100644
>> --- a/drivers/pci/pci.h
>> +++ b/drivers/pci/pci.h
>> @@ -959,6 +959,7 @@ static inline void
>> of_pci_remove_host_bridge_node(struct pci_host_bridge *bridge
>> #ifdef CONFIG_PCIEAER
>> void pci_no_aer(void);
>> void pci_aer_panic(void);
>> +bool pci_aer_panic_enabled(void);
>> void pci_aer_init(struct pci_dev *dev);
>> void pci_aer_exit(struct pci_dev *dev);
>> extern const struct attribute_group aer_stats_attr_group;
>> @@ -970,6 +971,7 @@ void pci_restore_aer_state(struct pci_dev *dev);
>> #else
>> static inline void pci_no_aer(void) { }
>> static inline void pci_aer_panic(void) { }
>> +static inline bool pci_aer_panic_enabled(void) { return false; }
>> static inline void pci_aer_init(struct pci_dev *d) { }
>> static inline void pci_aer_exit(struct pci_dev *d) { }
>> static inline void pci_aer_clear_fatal_status(struct pci_dev *dev) { }
>> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
>> index fa51fb8a5fe7..4fd7db90b77c 100644
>> --- a/drivers/pci/pcie/aer.c
>> +++ b/drivers/pci/pcie/aer.c
>> @@ -125,6 +125,18 @@ void pci_aer_panic(void)
>> pcie_aer_panic = true;
>> }
>> +/**
>> + * pci_aer_panic_enabled() - Are AER panic enabled system-wide?
>> + *
>> + * Return: true if AER panic has not been globally disabled through
>> ACPI FADT,
>> + * PCI bridge quirks, or the "pci=aer_panic" kernel command-line option.
>
> I don't think we have code to disable it via ACPI FADT or PCI bridge quirks
> currently, right? If yes, just list what is currently supported.
>
Dear Sathyanarayanan,
Thank you very much for your reply. You're right. If this series of
patches is supported in the discussion, I will remove the comment "ACPI
FADT, PCI bridge quirks" in the next version.
Best regards,
Hans
>> + */
>> +bool pci_aer_panic_enabled(void)
>> +{
>> + return pcie_aer_panic;
>> +}
>> +EXPORT_SYMBOL(pci_aer_panic_enabled);
>> +
>> bool pci_aer_available(void)
>> {
>> return !pcie_aer_disable && pci_msi_enabled();
>
next prev parent reply other threads:[~2025-05-19 14:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 16:55 [PATCH 0/4] pci: implement "pci=aer_panic" Hans Zhang
2025-05-16 16:55 ` [PATCH 1/4] " Hans Zhang
2025-05-16 16:55 ` [PATCH 2/4] PCI/AER: Introduce aer_panic kernel command-line option Hans Zhang
2025-05-16 16:55 ` [PATCH 3/4] PCI/AER: Expose AER panic state via pci_aer_panic_enabled() Hans Zhang
2025-05-17 4:07 ` Sathyanarayanan Kuppuswamy
2025-05-19 14:03 ` Hans Zhang [this message]
2025-05-16 16:55 ` [PATCH 4/4] PCI/AER: Trigger kernel panic on recovery failure if aer_panic is set Hans Zhang
2025-05-16 18:10 ` [PATCH 0/4] pci: implement "pci=aer_panic" Sathyanarayanan Kuppuswamy
2025-05-19 14:21 ` Hans Zhang
2025-05-19 14:39 ` Hans Zhang
2025-05-19 14:41 ` Hans Zhang
2025-05-20 16:09 ` Sathyanarayanan Kuppuswamy
2025-05-21 14:54 ` Hans Zhang
2025-05-21 16:17 ` Sathyanarayanan Kuppuswamy
2025-05-22 9:33 ` Hans Zhang
2025-05-19 22:03 ` Bjorn Helgaas
2025-05-20 15:11 ` Hans Zhang
2025-05-22 11:47 ` Manivannan Sadhasivam
2025-05-22 16:01 ` Hans Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3033cfb-6a70-4fa3-bf06-ee79517ef740@163.com \
--to=18255117159@163.com \
--cc=bhelgaas@google.com \
--cc=hans.zhang@cixtech.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.ibm.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=oohall@gmail.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).