backports: backport cross-device reservation support
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 27 Jul 2013 01:55:36 +0000 (18:55 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 30 Jul 2013 05:12:11 +0000 (22:12 -0700)
commit0cbba25bdf70ec3d7f2a27e36db295f535dcd230
tree871c6bbc8d9fd320ab4ebb325c257e7ca27310bc
parenta6e57fa6a80e91363fa04341a949ceaf469360ec
backports: backport cross-device reservation support

This backports cross-device reservation support.
Given that this feature is built around the
CONFIG_DMA_SHARED_BUFFER and given that some older kernels
will have DMA_SHARED_BUFFER without cross device reservation
support we can't use the c-file and h-file backports Kconfig
trick to automatically backport this feature from the
target git tree.

commit 786d7257e537da0674c02e16e3b30a44665d1cee
Author: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Date:   Thu Jun 27 13:48:16 2013 +0200

    reservation: cross-device reservation support, v4

    This adds support for a generic reservations framework that can be
    hooked up to ttm and dma-buf and allows easy sharing of reservations
    across devices.

    The idea is that a dma-buf and ttm object both will get a pointer
    to a struct reservation_object, which has to be reserved before
    anything is done with the contents of the dma-buf.

    Changes since v1:
     - Fix locking issue in ticket_reserve, which could cause
       mutex_unlock
       to be called too many times.
    Changes since v2:
     - All fence related calls and members have been taken out for now,
       what's left is the bare minimum to be useful for ttm locking conversion.
    Changes since v3:
     - Removed helper functions too. The documentation has an example
       implementation for locking. With the move to ww_mutex there is no
       need to have much logic any more.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: maarten.lankhorst@canonical.com
Cc: jglisse@redhat.com
Cc: airlied@redhat.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/backport-include/linux/reservation.h [new file with mode: 0644]
backport/compat/Kconfig
backport/compat/Makefile
backport/compat/drivers-base-reservation.c [new file with mode: 0644]