drm: Add a hash-tab rcu-safe API
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 20 Nov 2012 12:16:47 +0000 (12:16 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 28 Nov 2012 08:36:05 +0000 (18:36 +1000)
commit384cc2f9688994dfd505011ba3b08e0a702030b0
tree9d7f8d1f3a68d88442d35cd13a67563571147f29
parent7e8d9da32ea02f02a23f998cd2013408a4fe49bb
drm: Add a hash-tab rcu-safe API

While hashtab should now be RCU-safe, Add a drm_ht_xxx_api for consumers
to use to make it obvious what locking mechanism is used.

Document the way the rcu-safe interface should be used.

Don't use rcu-safe list traversal in modify operations where we should use
a spinlock / mutex anyway.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_hashtab.c
include/drm/drm_hashtab.h