From: "Alex Bereza" <alex@bereza.email>
To: "Gupta, Suraj" <suraj.gupta2@amd.com>,
"Alex Bereza" <alex@bereza.email>,
"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
"Michal Simek" <michal.simek@amd.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Tony Lindgren" <tony@atomide.com>
Cc: <dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: xilinx_dma: Fix CPU stall in xilinx_dma_poll_timeout
Date: Wed, 01 Apr 2026 13:41:17 +0200 [thread overview]
Message-ID: <DHHSGVWF7G9L.2SRDJY6GS561B@bereza.email> (raw)
In-Reply-To: <f5a8ac32-3c65-4703-87fc-d0990839887d@amd.com>
Hi Suraj,
On Wed Apr 1, 2026 at 1:15 PM CEST, Suraj Gupta wrote:
>>>> Hi, in addition to this patch I also have a question: what is the point
>>>> of atomically polling for the HALTED or IDLE bit in the stop_transfer
>>>> functions? Does device_terminate_all really need to be callable from
>>>> atomic context? If not, one could switch to polling non-atomically and
>>>> avoid burning CPU cycles.
>>>>
>>>
>>> dmaengine_terminate_async(), which directly calls device_terminate_all
>>> can be called from atomic context.
>>
>> Right, thanks! Just for my understanding: I still think there is potential for improvement, because
>> from my understanding it would be beneficial to do the waiting for the bits in the status register
>> and the freeing of descriptors in xilinx_dma_synchronize. Do I understand correctly that this is
>> currently not possible due to how the DMA engine API is structured? To make this possible I think
>> the deprecated dmaengine_terminate_all would have to be removed and all users of this API would have
>> to be adapted accordingly, correct? So this would be a patch of much larger scope than xilinx_dma
>> driver alone.
>
> Yes, your understanding of xilinx_dma_synchronize()and proposed changes
> looks correct.
Thank you for the feedback on this. It is really helpful since I'm quite new to
writing patches for the kernel. I was thinking about whether I can improve the
xilinx_dma driver in this regard, but given the large scope of changing the
whole DMA engine API and all its users unfortunately this task is too big for
me.
BR
Alex
prev parent reply other threads:[~2026-04-01 11:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 16:44 [PATCH] dmaengine: xilinx_dma: Fix CPU stall in xilinx_dma_poll_timeout Alex Bereza
2026-04-01 5:23 ` Gupta, Suraj
2026-04-01 8:27 ` Alex Bereza
2026-04-01 8:40 ` Geert Uytterhoeven
2026-04-01 11:15 ` Gupta, Suraj
2026-04-01 11:41 ` Alex Bereza [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=DHHSGVWF7G9L.2SRDJY6GS561B@bereza.email \
--to=alex@bereza.email \
--cc=Frank.Li@kernel.org \
--cc=arnd@arndb.de \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=suraj.gupta2@amd.com \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.org \
--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