From: Vinod Koul <vkoul@kernel.org>
To: dmaengine@vger.kernel.org
Cc: Frank Li <Frank.Li@kernel.org>, Vinod Koul <vkoul@kernel.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Koichiro Den <den@valinux.co.jp>
Subject: [PATCH] docs: dmaengine: clarify ordering rules around cookie completion
Date: Fri, 9 Oct 2026 11:37:44 +0200 [thread overview]
Message-ID: <20261009093745.539924-1-vkoul@kernel.org> (raw)
Sashiko pointed in [1] about the cookie completion order. It is good to
Document that for ensuring that dma buffer is flushed and no stale data
is seeing by consumer, we need to make sure such action is taken before
drivers invoke dma cookie completion.
[1]: https://lore.kernel.org/r/20260917072507.5BDB61F000FF@smtp.kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
Documentation/driver-api/dmaengine/provider.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/driver-api/dmaengine/provider.rst b/Documentation/driver-api/dmaengine/provider.rst
index 2897ade67b39..1bcbce705659 100644
--- a/Documentation/driver-api/dmaengine/provider.rst
+++ b/Documentation/driver-api/dmaengine/provider.rst
@@ -557,6 +557,11 @@ dma_cookie_t
- Not really relevant any more since the introduction of ``virt-dma``
that abstracts it away.
+- dmaengine drivers need to ensure buffers are flushed before invoking
+ vchan_cookie_complete() or dma_cookie_complete(). This would imply a call
+ to unmapping buffers or any such architcure calls to ensure caller seeing
+ buffers are flushed is done before invoking these calls.
+
dma_vec
- A small structure that contains a DMA address and length.
--
2.53.0
next reply other threads:[~2026-10-09 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 9:37 Vinod Koul [this message]
2026-10-09 9:40 ` [PATCH] docs: dmaengine: clarify ordering rules around cookie completion sashiko-bot
2026-10-09 13:40 ` Wolfram Sang
2026-10-09 16:15 ` Dave Jiang
2026-10-09 19:05 ` Frank Li
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=20261009093745.539924-1-vkoul@kernel.org \
--to=vkoul@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=den@valinux.co.jp \
--cc=dmaengine@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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