All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org, Frank Li <Frank.Li@kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Koichiro Den <den@valinux.co.jp>
Subject: Re: [PATCH] docs: dmaengine: clarify ordering rules around cookie completion
Date: Fri, 9 Oct 2026 14:05:38 -0500	[thread overview]
Message-ID: <ask7AujGmE7Ks6Xb@SMW015318> (raw)
In-Reply-To: <20261009093745.539924-1-vkoul@kernel.org>

On Fri, Oct 09, 2026 at 11:37:44AM +0200, Vinod Koul wrote:
> 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

Sashiko report a typo architcure

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> +  buffers are flushed is done before invoking these calls.
> +
>  dma_vec
>
>  - A small structure that contains a DMA address and length.
> --
> 2.53.0
>

  parent reply	other threads:[~2026-10-09 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  9:37 [PATCH] docs: dmaengine: clarify ordering rules around cookie completion Vinod Koul
2026-10-09  9:40 ` sashiko-bot
2026-10-09 13:40 ` Wolfram Sang
2026-10-09 16:15 ` Dave Jiang
2026-10-09 19:05 ` Frank Li [this message]
2026-10-11 20:31   ` Vinod Koul
2026-10-11 20:38 ` Vinod Koul

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=ask7AujGmE7Ks6Xb@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@kernel.org \
    --cc=den@valinux.co.jp \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@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 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.