From: Christoph Hellwig <hch@infradead.org>
To: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@linux-m68k.org>,
linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arch: m68k: Add DMA mapping operations for Coldfire M5441x
Date: Mon, 27 Jan 2025 22:40:17 -0800 [thread overview]
Message-ID: <Z5h70TL6lSWzGA4f@infradead.org> (raw)
In-Reply-To: <ba7ea0f0-be38-49a7-b416-3dc62c7e7425@yoseli.org>
On Tue, Jan 28, 2025 at 07:33:37AM +0100, Jean-Michel Hautbois wrote:
> > Arch dma code should not implement DMA OPS, but use the generic
> > dma-direct code with the right helpes for handling coherency. This
> > variant looks like it should be using the DMA_COHERENT_POOL allocator
> > for dma coherent memory.
>
> Thanks for your answer.
> I am not sure to understand it though :-) because I can see a few
> dma_map_ops implementations in arch code.
The last one left for the direct mapping are arm32 and parisc, and
they should go away eventually.
> I tried to let dma_direct do the
> work, I can't remember exactly what happened but it was not great :-).
> I can give it a second try.
It really should not be hard. The dynamic mappings already work fine
as m68k is using the generic code. So the only thing you want is
to dip into the glonal pool for coherent allocations. For that you
need to select the DMA_GLOBAL_POOL config option and fill the pool
with dma_init_global_coherent().
next prev parent reply other threads:[~2025-01-28 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 10:54 [PATCH 0/2] m68k: Add basic support for DMA global coherent pool Jean-Michel Hautbois
2025-01-21 10:54 ` [PATCH 1/2] m68k: Enable DMA support for Coldfire M5441x Jean-Michel Hautbois
2025-01-21 10:54 ` [PATCH 2/2] arch: m68k: Add DMA mapping operations " Jean-Michel Hautbois
2025-01-28 6:10 ` Christoph Hellwig
2025-01-28 6:33 ` Jean-Michel Hautbois
2025-01-28 6:40 ` Christoph Hellwig [this message]
2025-01-28 6:43 ` Jean-Michel Hautbois
2025-01-28 6:47 ` Christoph Hellwig
2025-01-29 7:32 ` Jean-Michel Hautbois
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=Z5h70TL6lSWzGA4f@infradead.org \
--to=hch@infradead.org \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=jeanmichel.hautbois@yoseli.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.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