From: Radu Rendec <rrendec@redhat.com>
To: Jingoo Han <jingoohan1@gmail.com>,
Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Krzysztof Wilczynski <kw@linux.com>,
Rob Herring <robh@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] PCI: dwc: Use regular interrupt instead of chained
Date: Thu, 29 Jun 2023 14:30:18 -0400 [thread overview]
Message-ID: <20230629183019.1992819-1-rrendec@redhat.com> (raw)
The DesignWare PCIe host driver uses a chained interrupt to demultiplex
the downstream MSI interrupts. In some circumstances, the system can get
into a state where the parent interrupt is triggered continuously, even
though reading the PCIe host registers doesn't identify any child MSI
interrupt source. This effectively locks up CPU0, which spends all the
time servicing these interrupts. This behavior has been observed on a
Qualcomm SA8540P Ride, with pcie2a and pcie3a enabled at the same time.
This is a clear example of how bypassing the interrupt core by using
chained interrupts can be very dangerous if the hardware misbehaves.
These issues are particularly hard to investigate, because the system
appears to be completely locked up.
The proposed solution is to use regular interrupts instead of chained
interrupts for the demultiplex handler in the PCI dwc driver. This
allows the interrupt storm detector to kick in and disable the faulty
interrupt. Testing showed that the interrupt storm is mitigated with no
visible impact (other than the specific log message), and the system
continues to run as expected. This is a much more desirable behavior
than a system lockup.
In a different thread [1], further advantages of regular over chained
interrupts were presented. This patch follows the guidelines set out in
that thread, and represents another real-life example of how things can
go really wrong with chained interrupts.
[1] https://lore.kernel.org/all/877csohcll.ffs@tglx/
Radu Rendec (1):
PCI: dwc: Use regular interrupt instead of chained
.../pci/controller/dwc/pcie-designware-host.c | 35 +++++++++----------
1 file changed, 17 insertions(+), 18 deletions(-)
--
2.41.0
next reply other threads:[~2023-06-29 18:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 18:30 Radu Rendec [this message]
2023-06-29 18:30 ` [PATCH 1/1] PCI: dwc: Use regular interrupt instead of chained Radu Rendec
2023-06-29 19:57 ` Bjorn Helgaas
2023-06-29 20:42 ` Radu Rendec
2023-06-29 20:58 ` Bjorn Helgaas
2023-06-29 21:27 ` Radu Rendec
2023-06-29 22:11 ` Bjorn Helgaas
2023-06-30 3:04 ` Radu Rendec
2023-07-13 17:03 ` Bjorn Helgaas
2023-07-13 20:26 ` Radu Rendec
2023-11-21 21:57 ` Radu Rendec
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=20230629183019.1992819-1-rrendec@redhat.com \
--to=rrendec@redhat.com \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=maz@kernel.org \
--cc=robh@kernel.org \
--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