From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: linux-renesas-soc@vger.kernel.org,
Koichiro Den <den@valinux.co.jp>, Vinod Koul <vkoul@kernel.org>,
Frank Li <Frank.Li@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 2/3] dmaengine: rcar-dmac: Add missing dma_descriptor_unmap()
Date: Sun, 27 Sep 2026 14:38:58 +0200 [thread overview]
Message-ID: <arkOX14nZOIlrVnD@shikoro> (raw)
In-Reply-To: <aqwXwOiPgRDUQfp_@SMW015318>
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
> > + dma_descriptor_unmap(&desc->async_tx);
>
> Does callback function still use these data? suppose should unmap after
> callback return.
Actually, the opposite is true. Drivers have been fixed to use this
order. One example:
commit 9b335978f7081cd4fe264709599a18073e12fee2
Author: Dave Jiang <dave.jiang@intel.com>
Date: Mon Jul 25 10:33:57 2016 -0700
dmaengine: fsldma: move unmap to before callback
Completion callback should happen after dma_descriptor_unmap() has
happened. This allow the cache invalidate to happen and ensure that
the data accessed by the upper layer is in memory that was from DMA
rather than stale data. On some architecture this is done by the
hardware, however we should make the code consistent to not cause
confusion.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-09-27 12:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 7:12 [PATCH 0/3] dmaengine: rcar-dmac: collection of small missed fixes Wolfram Sang
2026-09-17 7:12 ` [PATCH 1/3] dmaengine: rcar-dmac: Fix PM usage counter imbalance Wolfram Sang
2026-09-17 7:17 ` Laurent Pinchart
2026-09-17 7:12 ` [PATCH 2/3] dmaengine: rcar-dmac: Add missing dma_descriptor_unmap() Wolfram Sang
2026-09-17 7:25 ` sashiko-bot
2026-09-17 7:38 ` Laurent Pinchart
2026-09-17 8:23 ` Wolfram Sang
2026-09-17 16:39 ` Frank Li
2026-09-18 13:07 ` Koichiro Den
2026-09-27 12:43 ` Wolfram Sang
2026-09-27 13:11 ` Wolfram Sang
2026-09-29 4:13 ` Koichiro Den
2026-09-27 12:38 ` Wolfram Sang [this message]
2026-09-17 7:12 ` [PATCH 3/3] dmaengine: rcar-dmac: Remove redundant dev_err()/dev_err_probe() Wolfram Sang
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=arkOX14nZOIlrVnD@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=den@valinux.co.jp \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--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 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.