From: Feng Tang <feng.tang@linux.alibaba.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jonathan Cameron <Jonthan.Cameron@huawei.com>,
ilpo.jarvinen@linux.intel.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
Feng Tang <feng.tang@linux.alibaba.com>
Subject: [PATCH 2/2] PCI: Disable PCIE hotplug interrupts early when msi is disabled
Date: Tue, 4 Feb 2025 13:37:58 +0800 [thread overview]
Message-ID: <20250204053758.6025-2-feng.tang@linux.alibaba.com> (raw)
In-Reply-To: <20250204053758.6025-1-feng.tang@linux.alibaba.com>
There was a irq storm bug when testing "pci=nomsi" case, and the root
cause is: 'nomsi' will disable MSI and let devices and root ports use
legacy INTX inerrupt, and likely make several devices/ports share one
interrupt. In the failure case, BIOS doesn't disable the PCIE hotplug
interrupts, and actually asserts the command-complete interrupt.
As MSI is disabled, ACPI initialization code will not enumerate root
port's PCIE hotplug capability, and pciehp service driver wont' be
enabled for the root port to handle that interrupt, later on when it is
shared and enabled by other device driver like NVME or NIC, the "nobody
care irq storm" happens.
So disable the pcie hotplug CCIE/HPIE interrupt in early boot phase when
MSI is not enbaled.
Signed-off-by: Feng Tang <feng.tang@linux.alibaba.com>
---
drivers/pci/probe.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b6536ed599c3..10d72156da9a 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1664,6 +1664,15 @@ void set_pcie_hotplug_bridge(struct pci_dev *pdev)
pcie_capability_read_dword(pdev, PCI_EXP_SLTCAP, ®32);
if (reg32 & PCI_EXP_SLTCAP_HPC)
pdev->is_hotplug_bridge = 1;
+
+ /*
+ * When MSI is disabled, root port will use legacy INTX, and likely
+ * share INTX interrupt line with other devices like NIC/NVME. There
+ * was real world issue that the CCIE IRQ is asserted afer boot, but
+ * will not be handled well and cause IRQ storm. So disable it early.
+ */
+ if (!pci_msi_enabled())
+ pcie_disable_hp_interrupts_early(pdev);
}
static void set_pcie_thunderbolt(struct pci_dev *dev)
--
2.43.5
next prev parent reply other threads:[~2025-02-04 5:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 5:37 [PATCH 1/2] PCI/portdrv: Add necessary delay for disabling hotplug events Feng Tang
2025-02-04 5:37 ` Feng Tang [this message]
2025-02-04 9:14 ` [PATCH 2/2] PCI: Disable PCIE hotplug interrupts early when msi is disabled Lukas Wunner
2025-02-05 6:31 ` Feng Tang
2025-02-05 13:31 ` Feng Tang
2025-02-04 9:23 ` Lukas Wunner
2025-02-05 3:58 ` Feng Tang
2025-02-06 6:21 ` Lukas Wunner
2025-02-12 13:04 ` Feng Tang
2025-02-04 9:07 ` [PATCH 1/2] PCI/portdrv: Add necessary delay for disabling hotplug events Lukas Wunner
2025-02-05 2:46 ` Feng Tang
2025-02-05 17:48 ` Markus Elfring
2025-02-06 2:42 ` Feng Tang
2025-02-06 11:40 ` [1/2] " Markus Elfring
2025-02-07 1:40 ` Feng Tang
2025-02-05 18:26 ` [PATCH 1/2] " Sathyanarayanan Kuppuswamy
2025-02-06 3:18 ` Feng Tang
2025-02-07 4:26 ` Sathyanarayanan Kuppuswamy
2025-02-07 6:17 ` Feng Tang
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=20250204053758.6025-2-feng.tang@linux.alibaba.com \
--to=feng.tang@linux.alibaba.com \
--cc=Jonthan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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