diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-24 06:36:23 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-24 07:04:24 -0400 |
commit | 49d776ffb50f2e428aafb6a6576e58e80f1e886c (patch) | |
tree | 2193fc1bad884ead8fb3a8f8d2b01560d29b676a /sound/core | |
parent | 805772708741c7bee00aa8a73177375eee50d7e0 (diff) |
ALSA: pcm: Avoid mmap warnings on x86
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@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_native.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index dc9a1355a4ab..03e1e920ab13 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -3326,6 +3326,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream, | |||
3326 | area->vm_end - area->vm_start, area->vm_page_prot); | 3326 | area->vm_end - area->vm_start, area->vm_page_prot); |
3327 | } | 3327 | } |
3328 | #endif /* CONFIG_GENERIC_ALLOCATOR */ | 3328 | #endif /* CONFIG_GENERIC_ALLOCATOR */ |
3329 | #ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */ | ||
3329 | if (!substream->ops->page && | 3330 | if (!substream->ops->page && |
3330 | substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) | 3331 | substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) |
3331 | return dma_mmap_coherent(substream->dma_buffer.dev.dev, | 3332 | return dma_mmap_coherent(substream->dma_buffer.dev.dev, |
@@ -3333,6 +3334,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream, | |||
3333 | substream->runtime->dma_area, | 3334 | substream->runtime->dma_area, |
3334 | substream->runtime->dma_addr, | 3335 | substream->runtime->dma_addr, |
3335 | area->vm_end - area->vm_start); | 3336 | area->vm_end - area->vm_start); |
3337 | #endif /* CONFIG_X86 */ | ||
3336 | /* mmap with fault handler */ | 3338 | /* mmap with fault handler */ |
3337 | area->vm_ops = &snd_pcm_vm_ops_data_fault; | 3339 | area->vm_ops = &snd_pcm_vm_ops_data_fault; |
3338 | return 0; | 3340 | return 0; |