From: sashiko-bot@kernel.org
To: "Eugen Hristev" <ehristev@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: iproc-msi: Bound events handled per IRQ
Date: Fri, 16 Oct 2026 12:31:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-174297@kernel.org> (raw)
In-Reply-To: <20261016-iproc-irq-v1-1-ebaaf027f29e@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] pci: iproc-msi: missing dma_rmb() after TAIL register read
--
commit 8736e22d751e9208bad7bb267a7f08a76f8d4f77
Author: Eugen Hristev <ehristev@kernel.org>
PCI: iproc-msi: Bound events handled per IRQ
Limit each iProc MSI parent IRQ to 16 event-queue entries.
A continuously fed queue could otherwise keep the chained handler running
and starve other work. The budget still drains pending events and lets the
next parent interrupt continue processing, improving fairness and bounding
interrupt-handler latency.
> diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
> index 9ba242ab95967..6649807822d27 100644
> --- a/drivers/pci/controller/pcie-iproc-msi.c
> +++ b/drivers/pci/controller/pcie-iproc-msi.c
[ ... ]
> @@ -360,9 +364,11 @@ static void iproc_msi_handler(struct irq_desc *desc)
> break;
>
> /* process all outstanding events */
> - while (nr_events--) {
> + while (nr_events && event_budget) {
> hwirq = decode_msi_hwirq(msi, eq, head);
[Severity: High]
Does this sequence lack a necessary dma_rmb() before reading the event queue
in decode_msi_hwirq()?
Because iproc_msi_read_reg() uses readl_relaxed() to read the TAIL register,
weakly-ordered architectures could speculatively execute the DMA memory read
from msi->eq_cpu (inside decode_msi_hwirq()) before the MMIO read of the TAIL
register completes.
Could this result in reading stale hardware IRQ numbers from the event queue
on subsequent iterations of the polling loop, leading to missed or spurious
interrupts?
> generic_handle_domain_irq(msi->inner_domain, hwirq);
> + nr_events--;
> + event_budget--;
>
> head++;
> head %= EQ_LEN;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-iproc-irq-v1-1-ebaaf027f29e@kernel.org?part=1
next prev parent reply other threads:[~2026-10-16 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 12:18 [PATCH] PCI: iproc-msi: Bound events handled per IRQ Eugen Hristev
2026-10-16 12:31 ` sashiko-bot [this message]
2026-10-16 18:21 ` Bjorn Helgaas
2026-10-16 20:10 ` Eugen Hristev
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=sashiko-outbox-174297@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ehristev@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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