aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-25 02:51:54 -0400
committerTakashi Iwai <tiwai@suse.de>2011-03-25 06:13:12 -0400
commit3674f19dabd15f9541079a588149a370d888f4e6 (patch)
tree4a963fa23c738536cc935000d07f2ebebcc8e00f /include/sound
parent20b67dddcc5f29d3d0c900225d85e0ac655bc69d (diff)
ALSA: vmalloc buffers should use normal mmap
It's a big no-no to use pgprot_noncached() when mmap'ing such buffers into userspace since they are mapped cachable in kernel space. This can cause all sort of interesting things ranging from to garbled sound to lockups on various architectures. I've observed that usb-audio is broken on powerpc 4xx for example because of that. Also remove the now unused snd_pcm_lib_mmap_noncached(). It's an arch business to know when to use uncached mappings, there's already hacks for MIPS inside snd_pcm_default_mmap() and other archs are supposed to use dma_mmap_coherent(). (See my separate patch that adds dma_mmap_coherent() to powerpc) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 430a9cc045e2..e1bad1130616 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
1031#define snd_pcm_lib_mmap_iomem NULL 1031#define snd_pcm_lib_mmap_iomem NULL
1032#endif 1032#endif
1033 1033
1034int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream, 1034#define snd_pcm_lib_mmap_vmalloc NULL
1035 struct vm_area_struct *area);
1036#define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached
1037 1035
1038static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) 1036static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1039{ 1037{