From: sashiko-bot@kernel.org
To: "Gregory CLEMENT" <gregory.clement@bootlin.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 3/5] MIPS: eyeq: select the EyeQ5 MSI controller
Date: Thu, 03 Dec 2026 15:33:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-248118@kernel.org> (raw)
In-Reply-To: <20261203-eyeq5_msi-v6-3-8ffe74494bd2@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] irqchip/eyeq5-msi: missing irq_pre_redirect causes SMP IRQ
storm and livelock
--
commit 9fe61b747dd4fd35959e5a168f4786412aa69225
Author: Gregory CLEMENT <gregory.clement@bootlin.com>
MIPS: eyeq: select the EyeQ5 MSI controller
This commit selects EYEQ5_MSI under config EYEQ in arch/mips/Kconfig so
the EyeQ5 MSI controller driver is enabled by default on EyeQ platforms.
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index ed17c9b1624ca..19dbf24684b23 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -632,6 +632,7 @@ config EYEQ
> select CPU_MIPSR2_IRQ_VI
> select CSRC_R4K
> select DMA_NONCOHERENT
> + select EYEQ5_MSI
> select HAVE_PCI
> select IRQ_MIPS_CPU
> select MIPS_AUTO_PFN_OFFSET
[Severity: High]
Can enabling EYEQ5_MSI on SMP EyeQ platforms cause a parent IRQ storm,
duplicate MSI deliveries, and a livelock when an MSI is routed to a
remote CPU?
In drivers/irqchip/irq-eyeq5-msi.c, eyeq_msi_irq_chip uses
irq_chip_redirect_set_affinity under CONFIG_SMP and acks GCSR_IRQSTATUS
only in irq_ack. Neither eyeq_msi_irq_chip nor its child MSI chips
implement irq_pre_redirect.
When an MSI targets a remote CPU, demux_redirect_remote() queues irq_work
and returns true without calling eyeq_msi_ack_irq(). GCSR_IRQSTATUS
stays latched, so eyeq_msi_isr() spins through its drain loop and keeps
re-entering the level-triggered parent GIC IRQ until the remote CPU runs.
This also allows a duplicate MSI if the spinning parent ISR runs after
irq_work_single() clears IRQ_WORK_PENDING:
CPU0 (parent GIC IRQ) CPU1 (target CPU)
eyeq_msi_isr()
generic_handle_demux_domain_irq()
demux_redirect_remote()
irq_work_queue_on(..., CPU1)
/* GCSR_IRQSTATUS still set */
/* re-enters parent GIC IRQ */
irq_work_single()
clear IRQ_WORK_PENDING
eyeq_msi_isr()
demux_redirect_remote()
irq_work_queue_on(..., CPU1) <-- duplicate MSI queued
irq_redirect_work()
eyeq_msi_ack_irq()
If an interrupt arrives for a remotely-affined vector while desc->action
is NULL (racing with __free_irq()), demux_redirect_remote() skips
irq_work_queue_on() without acking GCSR_IRQSTATUS, leaving the parent
GIC line permanently asserted.
Moving the GCSR_IRQSTATUS ack into irq_pre_redirect under CONFIG_SMP
(making irq_ack a no-op) and setting irq_chip_pre_redirect_parent in
init_dev_msi_info(), as drivers/irqchip/irq-al-fic.c does, would avoid
this.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-eyeq5_msi-v6-0-8ffe74494bd2@bootlin.com?part=3
next prev parent reply other threads:[~2026-12-03 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 15:09 [PATCH v6 0/5] irqchip: add EyeQ5 PCIe MSI controller Gregory CLEMENT
2026-12-03 15:09 ` [PATCH v6 1/5] dt-bindings: interrupt-controller: add Mobileye " Gregory CLEMENT
2026-12-03 15:09 ` [PATCH v6 2/5] irqchip: irq-eyeq5-msi: add EyeQ5 PCIe MSI controller driver Gregory CLEMENT
2026-12-03 15:09 ` [PATCH v6 3/5] MIPS: eyeq: select the EyeQ5 MSI controller Gregory CLEMENT
2026-12-03 15:33 ` sashiko-bot [this message]
2026-12-03 15:09 ` [PATCH v6 4/5] MIPS: dts: eyeq5: add MSI controllers Gregory CLEMENT
2026-12-03 15:28 ` sashiko-bot
2026-12-03 15:09 ` [PATCH v6 5/5] MAINTAINERS: add EyeQ5 MSI controller entry Gregory CLEMENT
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-248118@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=robh@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