]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwspinlock/core: use a mutex to protect the radix tree
authorJuan Gutierrez <jgutierrez@ti.com>
Tue, 6 Sep 2011 06:30:16 +0000 (09:30 +0300)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:18:03 +0000 (11:18 -0800)
commitd8bafd6b3997a8078217b2556126f850cde5a387
treeac898d09b6acdcd52cf18ebbaa821e5bf9c326a4
parent5eecb1c8fa4472e6cf67aefe2fae14c275d490c3
hwspinlock/core: use a mutex to protect the radix tree

commit 93b465c2e186d96fb90012ba0f9372eb9952e732 upstream.

Since we're using non-atomic radix tree allocations, we
should be protecting the tree using a mutex and not a
spinlock.

Non-atomic allocations and process context locking is good enough,
as the tree is manipulated only when locks are registered/
unregistered/requested/freed.

The locks themselves are still protected by spinlocks of course,
and mutexes are not involved in the locking/unlocking paths.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
[ohad@wizery.com: rewrite the commit log, #include mutex.h, add minor
commentary]
[ohad@wizery.com: update register/unregister parts in hwspinlock.txt]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/hwspinlock.txt
drivers/hwspinlock/hwspinlock_core.c