From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
linux-mips <linux-mips@linux-mips.org>
Subject: Re: About MIPS specific dma_mmap_coherent()
Date: Wed, 14 Apr 2010 17:00:19 +0800 [thread overview]
Message-ID: <1271235619.25872.148.camel@falcon> (raw)
In-Reply-To: <s5hzl164kay.wl%tiwai@suse.de>
On Wed, 2010-04-14 at 08:31 +0200, Takashi Iwai wrote:
[...]
> >
> > Before, we have added the low-level handling with pgprot_noncached() in
> > snd_pcm_mmap() to fix it, but now, can we add MIPS specific
> > dma_mmap_coherent() as ARM did?
>
> That would be a certainly fix, yes. I have no objection, of course ;)
> A quicky, less-intrusive one would be the patch below.
The below patch works well, just tested it.
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index c22ebb0..fd6703e 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -3188,6 +3188,8 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
> substream->runtime->dma_area,
> substream->runtime->dma_addr,
> area->vm_end - area->vm_start);
> +#elif defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
> + area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
> #endif /* ARCH_HAS_DMA_MMAP_COHERENT */
> /* mmap with fault handler */
> area->vm_ops = &snd_pcm_vm_ops_data_fault;
next prev parent reply other threads:[~2010-04-14 9:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 4:58 About MIPS specific dma_mmap_coherent() Wu Zhangjin
2010-04-13 16:49 ` Takashi Iwai
2010-04-14 4:21 ` Wu Zhangjin
2010-04-14 6:31 ` Takashi Iwai
2010-04-14 9:00 ` Wu Zhangjin [this message]
2010-04-14 15:46 ` Takashi Iwai
2010-05-11 18:48 ` Ralf Baechle
2010-05-12 6:42 ` Wu Zhangjin
2010-05-12 8:41 ` Takashi Iwai
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=1271235619.25872.148.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=tiwai@suse.de \
/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