Re: About MIPS specific dma_mmap_coherent()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux