From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: dmaengine@vger.kernel.org, vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v6 7/7] dmaengine: dw-axi-dmac: serialize interrupt status with channel reuse
Date: Mon, 16 Nov 2026 06:22:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-216269@kernel.org> (raw)
In-Reply-To: <20261115-submit-dw-axi-dma-stop-pause-v1-v6-7-bcb23d1e7029@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dmaengine: dw-axi-dmac: premature axi_req_irqs() call in
dw_probe()
--
commit 6c849580a58ee4adc45dc13e6749fbe0bf5958b1
Author: James Hilliard <james.hilliard1@gmail.com>
dmaengine: dw-axi-dmac: serialize interrupt status with channel reuse
This commit moves channel interrupt status reading and clearing under
chan->vc.lock, clears all channel interrupts in dma_chan_terminate_all(),
and moves axi_req_irqs() after vchan_init() in dw_probe().
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 97098367535f0..0116c44d3bef1 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
[ ... ]
> @@ -1599,10 +1596,6 @@ static int dw_probe(struct platform_device *pdev)
> if (!dw->chan)
> return -ENOMEM;
>
> - ret = axi_req_irqs(pdev, chip);
> - if (ret)
> - return ret;
> -
> INIT_LIST_HEAD(&dw->dma.channels);
> for (i = 0; i < hdata->nr_channels; i++) {
> struct axi_dma_chan *chan = &dw->chan[i];
> @@ -1616,6 +1609,10 @@ static int dw_probe(struct platform_device *pdev)
> vchan_init(&chan->vc, &dw->dma);
> }
>
> + ret = axi_req_irqs(pdev, chip);
> + if (ret)
> + return ret;
[Severity: Medium]
Is axi_req_irqs() still called too early in dw_probe()?
axi_req_irqs() registers dw_axi_dma_interrupt() with IRQF_SHARED, so the
handler can run immediately when another device on the shared line
asserts an interrupt or when CONFIG_DEBUG_SHIRQ is enabled. At this
point in dw_probe(), axi_dma_resume() has not yet enabled chip->clks,
axi_dma_hw_init() has not masked channel interrupts, and
dmaenginem_async_device_register() has not allocated
chan->vc.chan.chan_dev:
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:dw_probe() {
...
ret = axi_dma_resume(chip);
if (ret < 0)
goto err_pm_disable;
axi_dma_hw_init(chip);
pm_runtime_put(chip->dev);
ret = dmaenginem_async_device_register(&dw->dma);
...
}
If dw_axi_dma_interrupt() runs before those steps, it accesses DMAC
registers while the clocks are disabled, enables global DMAC interrupts
before per-channel interrupts are masked, and dereferences a NULL
chan->vc.chan.chan_dev in axi_chan_name() or vchan_chan_dev().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261115-submit-dw-axi-dma-stop-pause-v1-v6-0-bcb23d1e7029@gmail.com?part=7
prev parent reply other threads:[~2026-11-16 6:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 6:00 [PATCH v6 0/7] dmaengine: dw-axi-dmac: fix termination and pause acknowledgment James Hilliard
2026-11-16 6:00 ` [PATCH v6 1/7] dmaengine: dw-axi-dmac: keep cyclic mode in the descriptor James Hilliard
2026-11-16 6:00 ` [PATCH v6 2/7] dmaengine: dw-axi-dmac: poll the correct enable bit during termination James Hilliard
2026-11-16 6:00 ` [PATCH v6 3/7] dmaengine: dw-axi-dmac: retain descriptors when termination times out James Hilliard
2026-11-16 6:00 ` [PATCH v6 4/7] dmaengine: dw-axi-dmac: use atomic polling for suspend acknowledgment James Hilliard
2026-11-16 6:00 ` [PATCH v6 5/7] dmaengine: dw-axi-dmac: preserve pending pause requests James Hilliard
2026-11-16 6:00 ` [PATCH v6 6/7] dmaengine: dw-axi-dmac: retain descriptors until callbacks drain James Hilliard
2026-11-16 6:00 ` [PATCH v6 7/7] dmaengine: dw-axi-dmac: serialize interrupt status with channel reuse James Hilliard
2026-11-16 6:22 ` sashiko-bot [this message]
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-216269@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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