]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: vmalloc buffers should use normal mmap
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 25 Mar 2011 06:51:54 +0000 (17:51 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 20:01:58 +0000 (13:01 -0700)
commitc27b92295ab4c6b90b1cee94c4c9c1b4732e1c2e
tree6d2e7c9b24f58b0b5afa87fc461727fa08c096be
parent952ef7855e21fead362d72c9f422bb0f2ec02687
ALSA: vmalloc buffers should use normal mmap

commit 3674f19dabd15f9541079a588149a370d888f4e6 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/sound/pcm.h
sound/core/pcm_native.c