]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Implement arch_spin_is_locked() using arch_spin_value_unlocked()
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jan 2014 07:14:29 +0000 (18:14 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 28 Jan 2014 03:45:44 +0000 (14:45 +1100)
commit6c5c0796a29825dacd0bef2abfdf29865027103e
tree4904e3a0268095e0242b29adc782708a7729ccc8
parentcb5d947f4aecb06037c30d22f30dc8397b3a36ee
powerpc: Implement arch_spin_is_locked() using arch_spin_value_unlocked()

At a glance these are just the inverse of each other. The one subtlety
is that arch_spin_value_unlocked() takes the lock by value, rather than
as a pointer, which is important for the lockref code.

On the other hand arch_spin_is_locked() doesn't really care, so
implement it in terms of arch_spin_value_unlocked().

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/spinlock.h