From: Peng Fan <peng.fan@oss.nxp.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 0/3] dmaengine: Use non-atomic bit ops where safe
Date: Fri, 4 Sep 2026 10:08:25 +0800 [thread overview]
Message-ID: <apooGfaHN5aCO/Gn@shlinux89> (raw)
In-Reply-To: <apnKqR6ScF2K3GFo@SMW015318>
On Thu, Sep 03, 2026 at 02:29:45PM -0500, Frank Li wrote:
>On Thu, Sep 03, 2026 at 10:16:11PM +0800, Peng Fan (OSS) wrote:
>> dma_cap_set()/dma_cap_clear() and imx-sdma event_mask setup use atomic
>> set_bit()/clear_bit() in contexts where no concurrent access is
>> possible:
>>
>> - dma_cap_set()/dma_cap_clear() are called exclusively during driver
>> probe, before dma_async_device_register() makes the device visible.
>> - imx-sdma event_mask[] is zeroed and configured during channel setup
>> while the channel is disabled.
>>
>> Switch both to non-atomic __set_bit()/__clear_bit() equivalents.
>
>Any benefit to switch?
Drop patch 1, I thought there were no cocurrent access.
For patch 2: The driver already uses the non-atomic __set_bit/__clear_bit APIs,
I think no sense to use atomic APIs in sdma_set_watermarklevel_for_p2p, or
I may miss something.
For patch 3: Use __assign_bit to save code lines.
Thanks
Peng
>
>Frank
>
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>> Peng Fan (3):
>> dmaengine: Use non-atomic bit ops for cap_mask manipulation
>> dmaengine: imx-sdma: Use non-atomic __set_bit() for event_mask setup
>> dmaengine: imx-sdma: Use __assign_bit() for ownership configuration
>>
>> drivers/dma/imx-sdma.c | 21 +++++----------------
>> include/linux/dmaengine.h | 4 ++--
>> 2 files changed, 7 insertions(+), 18 deletions(-)
>> ---
>> base-commit: 89c07d98716a13454ec3fd9f97689e812cc71bd4
>> change-id: 20260903-dma-mask-ddf64d770f7d
>>
>> Best regards,
>> --
>> Peng Fan <peng.fan@nxp.com>
>>
>
>
prev parent reply other threads:[~2026-09-04 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:16 [PATCH 0/3] dmaengine: Use non-atomic bit ops where safe Peng Fan (OSS)
2026-09-03 14:16 ` [PATCH 1/3] dmaengine: Use non-atomic bit ops for cap_mask manipulation Peng Fan (OSS)
2026-09-03 14:16 ` [PATCH 2/3] dmaengine: imx-sdma: Use non-atomic __set_bit() for event_mask setup Peng Fan (OSS)
2026-09-03 14:16 ` [PATCH 3/3] dmaengine: imx-sdma: Use __assign_bit() for ownership configuration Peng Fan (OSS)
2026-09-03 19:29 ` [PATCH 0/3] dmaengine: Use non-atomic bit ops where safe Frank Li
2026-09-04 2:08 ` Peng Fan [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=apooGfaHN5aCO/Gn@shlinux89 \
--to=peng.fan@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--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