]> git.baikalelectronics.ru Git - kernel.git/commit
reservation: cross-device reservation support, v4
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>
Thu, 27 Jun 2013 11:48:16 +0000 (13:48 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Jun 2013 02:02:15 +0000 (12:02 +1000)
commit4bf49df54d0519357cebce5dba90ba63739ec610
tree005686710f85aa8e5626c0849f7a539a18875779
parent57c3bc36c235ab8a389fe0c648a6b2b9e0e81074
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>
Documentation/DocBook/device-drivers.tmpl
drivers/base/Makefile
drivers/base/reservation.c [new file with mode: 0644]
include/linux/reservation.h [new file with mode: 0644]