Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Koichiro Den <den@valinux.co.jp>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Frank Li <Frank.li@oss.nxp.com>,
	linux-renesas-soc@vger.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: Fri, 9 Oct 2026 11:26:41 +0200	[thread overview]
Message-ID: <asizUWUuEdkyKodN@parshuram> (raw)
In-Reply-To: <ezlwzpaq54573ewlofeep3zqqajj7ycpanv24ogujtm3alc23l@ehq5obt3bnfn>

On 29-09-26, 13:13, Koichiro Den wrote:
> On Sun, Sep 27, 2026 at 03:11:26PM +0200, Wolfram Sang wrote:
> > 
> > > I share this thought, and I guess, Laurent expressed this, too. This is
> > > a separate task to tackle, though. I still think your original patch
> > > here makes the situation better by making sure the cache gets
> > > invalidated and should be applied. Or am I missing something?
> > 
> > Okay, I got now that Sashiko's comment was related to cookie-completion
> > and not the callback. For me, its comment also makes sense because it is
> > basically the same argument which the commits I quoted to Frank used:
> > ensure cache completion. This is not only good before the callback but
> > also before cookie completion. Or am I missing something?
> > 
> > This is easy to fix. If we can agree on switching unmapping before
> > cookie completion, I can update this patch and then send a series to fix
> > other drivers, too.
> 
> I agree with changing {cookie -> unmap}** to {unmap -> cookie} in this patch.
> It looks like an improvement, I don't see any obvious downside to doing so.
> 
> Many drivers do {cookie -> unmap}, so it may be worth making the same change
> there too. I haven't found a specific reason for that order in the history I
> checked, but I'd also like to hear Frank's thoughts.

I cna chime in. I think Shashiko is correct here. We should ideally
unmap first and then call complete. This would ensure anyone seeing the
completion would get the right data buffer and chances of stale data are
eliminated.

So Wolfram, can you please reverse the order.
Also, lets document this.

Thanks
-- 
~Vinod

  reply	other threads:[~2026-10-09  9:26 UTC|newest]

Thread overview: 16+ 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: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-10-09  9:26             ` Vinod Koul [this message]
2026-10-09 13:38               ` Wolfram Sang
2026-10-09  9:23       ` Vinod Koul
2026-09-27 12:38     ` Wolfram Sang
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=asizUWUuEdkyKodN@parshuram \
    --to=vkoul@kernel.org \
    --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=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