ALSA: vmalloc buffers should use normal mmap
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 25 Mar 2011 06:51:54 +0000 (17:51 +1100)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:40:24 +0000 (11:40 -0700)
commitceceb382eea70f7aabef0d4b0933bc24733e3eb0
treed119b1143b2a836755d487e672a38d3284e33618
parente6a59718d076932bbe75b2f3c4cb1dc2a291a6bd
ALSA: vmalloc buffers should use normal mmap

BugLink: http://bugs.launchpad.net/bugs/761134

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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/sound/pcm.h
sound/core/pcm_native.c