[alsa-devel] [PATCH] ALSA: pcm: Avoid mmap warnings on x86
Takashi Iwai
tiwai at suse.de
Fri Oct 24 13:04:37 CEST 2014
On x86, using dma_mmap_coherent() for the pages allocated via
dma_alloc_coherent() results in a warning like:
aplay:32536 map pfn RAM range req uncached-minus for [mem 0x21d500000-0x21d51ffff], got write-back
Until the issue is addressed in the core side, take back to the old
good way in PCM code only for x86.
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/core/pcm_native.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index a915ed07aee1..2f7ad10ee7c3 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3324,6 +3324,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
area->vm_end - area->vm_start, area->vm_page_prot);
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
+#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
if (!substream->ops->page &&
substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
return dma_mmap_coherent(substream->dma_buffer.dev.dev,
@@ -3331,6 +3332,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
substream->runtime->dma_area,
substream->runtime->dma_addr,
area->vm_end - area->vm_start);
+#endif /* CONFIG_X86 */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
return 0;
--
2.1.2
More information about the Alsa-devel
mailing list