]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7495/1: mutex: use generic atomic_dec-based implementation for ARMv6+
authorWill Deacon <will.deacon@arm.com>
Thu, 16 Aug 2012 17:43:04 +0000 (18:43 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 25 Aug 2012 08:22:31 +0000 (09:22 +0100)
commit6e5eee89fd5a6dea6926ecd0526cd023374c14f7
tree89cba4f9789841cd2fbf129c945fbd25575be98a
parent47228091c39f16cc9cec50b23c87ce6507a6a18b
ARM: 7495/1: mutex: use generic atomic_dec-based implementation for ARMv6+

Commit 0692640d8441 ("ARM: 7467/1: mutex: use generic xchg-based
implementation for ARMv6+") removed the barrier-less, ARM-specific
mutex implementation in favour of the generic xchg-based code.

Since then, a bug was uncovered in the xchg code when running on SMP
platforms, due to interactions between the locking paths and the
MUTEX_SPIN_ON_OWNER code. This was fixed in d67b510675e6 ("mutex: place
lock in contended state after fastpath_lock failure"), however, the
atomic_dec-based mutex algorithm is now marginally more efficient for
ARM (~0.5% improvement in hackbench scores on dual A15).

This patch moves ARMv6+ platforms to the atomic_dec-based mutex code.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/mutex.h