linux/include
Daniel Vetter f00b4dad9d dma-buf: implement vmap refcounting in the interface logic
All drivers which implement this need to have some sort of refcount to
allow concurrent vmap usage. Hence implement this in the dma-buf core.

To protect against concurrent calls we need a lock, which potentially
causes new funny locking inversions. But this shouldn't be a problem
for exporters with statically allocated backing storage, and more
dynamic drivers have decent issues already anyway.

Inspired by some refactoring patches from Aaron Plattner, who
implemented the same idea, but only for drm/prime drivers.

v2: Check in dma_buf_release that no dangling vmaps are left.
Suggested by Aaron Plattner. We might want to do similar checks for
attachments, but that's for another patch. Also fix up ERR_PTR return
for vmap.

v3: Check whether the passed-in vmap address matches with the cached
one for vunmap. Eventually we might want to remove that parameter -
compared to the kmap functions there's no need for the vaddr for
unmapping.  Suggested by Chris Wilson.

v4: Fix a brown-paper-bag bug spotted by Aaron Plattner.

Cc: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2013-02-27 15:13:36 +05:30
..
acpi PCI changes for the v3.9 merge window: 2013-02-25 21:18:18 -08:00
asm-generic Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-02-26 19:50:22 -08:00
clocksource arm: arch_timer: add missing inline in stub function 2013-02-11 15:16:05 -08:00
crypto
drm drm: Add HDMI infoframe helpers 2013-02-22 08:20:10 +01:00
keys
linux dma-buf: implement vmap refcounting in the interface logic 2013-02-27 15:13:36 +05:30
math-emu
media [media] media: ov7670: Add possibility to disable pixclk during hblank 2013-02-08 14:35:06 -02:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-26 11:44:11 -08:00
pcmcia
ras
rdma IB/core: Add "type 2" memory windows support 2013-02-21 11:51:45 -08:00
rxrpc
scsi
sound ASoC: Final updates for v3.9 2013-02-16 15:48:48 +01:00
target target: Rename spc_get_write_same_sectors -> sbc_get_write_same_sectors 2013-02-23 12:46:14 -08:00
trace The one new feature added in this patch series is the ability to use 2013-02-26 14:52:45 -08:00
uapi VFIO for 3.9-rc1 2013-02-26 14:48:30 -08:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-02-25 16:46:44 -08:00
xen xen: event channel arrays are xen_ulong_t and not unsigned long 2013-02-20 08:45:07 -05:00
Kbuild