From: sashiko-bot@kernel.org
To: "Tushar Nimkar" <tushar.nimkar@amd.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/2] irqchip: Add Xilinx Versal NET SMMU CSR interrupt controller driver
Date: Wed, 23 Sep 2026 07:26:06 +0000 [thread overview]
Message-ID: <20260923072607.0E9731F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923-smmu-changes-v2-v3-2-87bd09ba9605@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] irqchip: spurious interrupts due to handle_level_irq with latched status
--
commit 2d37d393fff3fd3914b9e3ef7cecbd4d6f1c364c
Author: Anirudha Sarangi <anirudha.sarangi@amd.com>
irqchip: Add Xilinx Versal NET SMMU CSR interrupt controller driver
The Xilinx Versal NET SoC implements a Control and Status Register (CSR) block
in front of the ARM SMMUv3 to manage EVENTQ, PRIQ and GLOBAL interrupts. This
commit adds an irqchip driver for the CSR block that registers as an interrupt
controller and chains to the upstream SMMUv3 driver.
> diff --git a/drivers/irqchip/irq-xilinx-smmu-csr.c b/drivers/irqchip/irq-xilinx-smmu-csr.c
> new file mode 100644
> index 0000000000000..b29aafd01dbeb
> --- /dev/null
> +++ b/drivers/irqchip/irq-xilinx-smmu-csr.c
[ ... ]
> +static struct irq_chip xilinx_smmu_csr_chip = {
> + .name = "xlnx-smmu-csr",
> + .irq_mask = xilinx_smmu_csr_irq_mask,
> + .irq_unmask = xilinx_smmu_csr_irq_unmask,
> + .irq_ack = xilinx_smmu_csr_irq_ack,
> +};
[ ... ]
> +static int xilinx_smmu_csr_domain_map(struct irq_domain *d, unsigned int virq,
> + irq_hw_number_t hwirq)
> +{
> + struct xilinx_smmu_csr *csr = d->host_data;
> +
> + if (!xilinx_smmu_csr_hwirq_mask(hwirq))
> + return -EINVAL;
> +
> + irq_set_chip_and_handler(virq, &xilinx_smmu_csr_chip, handle_level_irq);
[Severity: High]
Will using handle_level_irq() cause spurious interrupts due to the latched
status in the SMMU_CSR_ISR register?
Since handle_level_irq() acknowledges the interrupt by calling the .irq_ack
callback (which clears the W1C SMMU_CSR_ISR register) before invoking the
SMMUv3 device handler, the CSR block clears its status while the underlying
SMMU line is still asserted.
Because the source isn't deasserted yet, the CSR block will immediately
re-latch the status. When handle_level_irq() unmasks the interrupt after the
SMMUv3 handler finishes, this re-latched status will trigger a second
interrupt. The SMMUv3 driver will find no actual events and return IRQ_NONE,
eventually causing the kernel's spurious interrupt detector to disable the GIC
line.
Should this driver use handle_fasteoi_irq() and implement the .irq_eoi
callback instead, so the CSR status is only cleared after the underlying
SMMUv3 driver has successfully deasserted the source?
> + irq_set_chip_data(virq, csr);
> + irq_set_status_flags(virq, IRQ_LEVEL);
> +
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923-smmu-changes-v2-v3-0-87bd09ba9605@amd.com?part=2
next prev parent reply other threads:[~2026-09-23 7:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 7:16 [PATCH v3 0/2] Add Xilinx Versal NET SMMU CSR interrupt controller support Tushar Nimkar
2026-09-23 7:16 ` [PATCH v3 1/2] dt-bindings: interrupt-controller: Add Xilinx Versal NET SMMU CSR Tushar Nimkar
2026-09-23 16:41 ` Conor Dooley
2026-09-24 7:43 ` Tushar Nimkar
2026-09-24 16:52 ` Conor Dooley
2026-09-23 7:16 ` [PATCH v3 2/2] irqchip: Add Xilinx Versal NET SMMU CSR interrupt controller driver Tushar Nimkar
2026-09-23 7:26 ` sashiko-bot [this message]
2026-09-28 7:28 ` Tushar Nimkar
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=20260923072607.0E9731F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tushar.nimkar@amd.com \
/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