From: sashiko-bot@kernel.org
To: "Eliav Farber" <farbere@amazon.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 9/9] irqchip/al-fic: support per-child affinity via interrupt redirection
Date: Sun, 11 Oct 2026 05:16:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-167034@kernel.org> (raw)
In-Reply-To: <20261011050449.41903-10-farbere@amazon.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] irqchip/al-fic: unconfigured level interrupts cause interrupt storm on redirection
--
commit a2b0d194e9e91e226ae5163eb51d0cdf61945a75
Author: Eliav Farber <farbere@amazon.com>
irqchip/al-fic: support per-child affinity via interrupt redirection
This commit wires al-fic into the interrupt redirection infrastructure to
support per-child affinity control. It defers the handler execution to the
target CPU via irq_work while moving the ack (and masking for level
configured groups) into parent context using irq_pre_redirect.
> diff --git a/drivers/irqchip/irq-al-fic.c b/drivers/irqchip/irq-al-fic.c
> index 13a945a1d312a..77cff6308eba1 100644
> --- a/drivers/irqchip/irq-al-fic.c
> +++ b/drivers/irqchip/irq-al-fic.c
[ ... ]
> @@ -157,6 +163,32 @@ static int al_fic_irq_retrigger(struct irq_data *data)
> return 1;
> }
>
> +#ifdef CONFIG_SMP
> +/* The ack happens in al_fic_irq_pre_redirect() on both paths instead. */
> +static void al_fic_irq_noop(struct irq_data *data) { }
> +
> +/*
> + * Runs in the parent interrupt context on every dispatch, redirected or not.
> + * Clear the cause bit here: once the flow handler is deferred, the FIC keeps
> + * driving its output until the irq_work runs, and a level parent SPI re-fires.
> + *
> + * A level configured group is masked too, because its cause bit re-latches
> + * while the input stays asserted; the deferred handle_level_irq() unmasks
> + * when the handler is done. An edge configured group is only acked, since
> + * handle_edge_irq() never unmasks unconditionally and the mask would stay.
> + */
> +static void al_fic_irq_pre_redirect(struct irq_data *data)
> +{
> + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data);
> + struct al_fic *fic = gc->private;
> +
> + if (fic->state == AL_FIC_CONFIGURED_LEVEL)
> + irq_gc_mask_set_bit(data);
[Severity: High]
Could unconfigured level interrupts cause an interrupt storm on redirection
here?
If a driver requests a child interrupt without specifying a trigger type,
fic->state remains AL_FIC_UNCONFIGURED.
Since the generic chip defaults to handle_level_irq, when the interrupt
fires and its affinity excludes the current CPU,
generic_handle_demux_domain_irq() calls al_fic_irq_pre_redirect().
Because the state is unconfigured, the check for AL_FIC_CONFIGURED_LEVEL
fails and the interrupt is not masked.
The handler execution is then deferred to another CPU via irq_work.
However, because the hardware is level-triggered and was not masked, the
FIC continues asserting the parent SPI. This immediately re-triggers the
parent interrupt upon return, trapping the parent CPU in an infinite loop.
> +
> + irq_gc_ack_clr_bit(data);
> +}
> +#endif /* CONFIG_SMP */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261011050449.41903-1-farbere@amazon.com?part=9
next prev parent reply other threads:[~2026-10-11 5:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 5:04 [PATCH v5 0/9] irqchip/al-fic: shared parent IRQ, error/fatal outputs and affinity Eliav Farber
2026-10-11 5:04 ` [PATCH v5 1/9] irqchip/al-fic: fix argument alignment and a repeated word Eliav Farber
2026-10-11 5:04 ` [PATCH v5 2/9] irqchip/al-fic: use %pe to print init error Eliav Farber
2026-10-12 18:42 ` Radu Rendec
2026-10-11 5:04 ` [PATCH v5 3/9] irqchip/al-fic: use %pOF and raise init log level Eliav Farber
2026-10-11 5:04 ` [PATCH v5 4/9] irqchip/al-fic: keep the device_node instead of a cached name string Eliav Farber
2026-10-12 18:53 ` Radu Rendec
2026-10-11 5:04 ` [PATCH v5 5/9] irqchip/al-fic: switch to shared parent interrupt Eliav Farber
2026-10-11 5:14 ` sashiko-bot
2026-10-11 5:04 ` [PATCH v5 6/9] dt-bindings: interrupt-controller: amazon,al-fic: add mask selection Eliav Farber
2026-10-11 5:04 ` [PATCH v5 7/9] irqchip/al-fic: support error and fatal outputs and FIC v2 Eliav Farber
2026-10-11 5:04 ` [PATCH v5 8/9] irqchip/al-fic: add support for FIC v3 Eliav Farber
2026-10-11 5:04 ` [PATCH v5 9/9] irqchip/al-fic: support per-child affinity via interrupt redirection Eliav Farber
2026-10-11 5:16 ` sashiko-bot [this message]
2026-10-12 19:10 ` 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=sashiko-outbox-167034@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=farbere@amazon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.