From: Takashi Iwai <tiwai@suse.de>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-mips@linux-mips.org,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH] mips: Add dma_mmap_coherent()
Date: Thu, 21 Aug 2008 12:25:20 +0200 [thread overview]
Message-ID: <s5hod3mvf5b.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080821102052.GA31001@linux-mips.org>
At Thu, 21 Aug 2008 11:20:52 +0100,
Ralf Baechle wrote:
>
> On Wed, Aug 20, 2008 at 12:58:08PM -0500, James Bottomley wrote:
>
> > On Wed, 2008-08-20 at 18:53 +0200, Takashi Iwai wrote:
> > > > I'm afraid there are several problems. The first is that it doesn't do
> > > > what you want. You can't map a coherent page to userspace (which is at
> > > > a non congruent address on parisc) and still expect it to be
> > > > coherent ... there's going to have to be fiddling with the page table
> > > > caches to make sure coherency isn't destroyed by aliasing effects
> > >
> > > Hmm... how bad would be the coherency with such a simple mmap method?
> > > In most cases, we don't need the "perfect" coherency. Usually one
> > > process mmaps the whole buffer and keep reading/writing. There is
> > > another use case (sharing the mmapped buffer by multiple processes),
> > > but this can be disabled if we know it's not feasible beforehand.
> >
> > Unfortunately, the incoherency is between the user and the kernel.
> > That's where the aliasing effects occur, so realistically, even though
> > you've mapped coherent memory to the user, the coherency of that memory
> > is only device <-> kernel. When the any single user space process
> > writes to it, the device won't see the write unless the user issues a
> > flush.
>
> Same applied on MIPS. Some platforms have the additional requirement that
> the buffer must not be mapped by the TLB during the DMA operation or bad
> things could happen.
Well, in the case of audio hardware, the DMA is always running as long
as the stream is running. So, on such platforms, the usual mappings
are not allowed at all during audio streaming?
Takashi
next prev parent reply other threads:[~2008-08-21 10:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <s5hk5eezcfe.wl%tiwai@suse.de>
2008-08-20 16:27 ` [PATCH] mips: Add dma_mmap_coherent() James Bottomley
2008-08-20 16:53 ` Takashi Iwai
2008-08-20 17:58 ` James Bottomley
2008-08-21 10:19 ` Takashi Iwai
2008-08-21 13:55 ` James Bottomley
2008-08-21 16:01 ` Takashi Iwai
2008-08-21 16:03 ` Takashi Iwai
2008-08-21 21:41 ` Thomas Bogendoerfer
2008-08-22 6:07 ` Takashi Iwai
2008-08-22 9:41 ` Thomas Bogendoerfer
2008-08-22 10:23 ` Takashi Iwai
2008-08-22 14:36 ` Thomas Bogendoerfer
2008-08-22 14:47 ` Takashi Iwai
2008-08-21 10:20 ` Ralf Baechle
2008-08-21 10:25 ` Takashi Iwai [this message]
2008-08-22 12:04 Joel Soete
2008-08-22 12:17 ` Takashi Iwai
2008-08-23 19:39 ` Joel Soete
2008-08-26 15:25 ` Takashi Iwai
2008-08-26 21:01 ` Grant Grundler
2008-08-27 5:42 ` Takashi Iwai
2008-08-27 10:38 ` Ralf Baechle
2008-08-27 14:06 ` James Bottomley
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=s5hod3mvf5b.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-parisc@vger.kernel.org \
--cc=ralf@linux-mips.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