aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc/mpc8260.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-07-13 19:15:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 10:40:03 -0700
commitb3109b3c87de5f6d98d8418c5f1931d9d2609ae0 (patch)
tree925b4840f5246802dd1a38e2a4cd1b9f0d62e72a /include/asm-powerpc/mpc8260.h
parent56015aefc7a036e7a6156a2b5b3eb6e975354e86 (diff)
ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
commit a76d7bd96d65fa5119adba97e1b58d95f2e78829 upstream. The open-coded mutex implementation for ARMv6+ cores suffers from a severe lack of barriers, so in the uncontended case we don't actually protect any accesses performed during the critical section. Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec code but optimised to remove a branch instruction, as the mutex fastpath was previously inlined. Now that this is executed out-of-line, we can reuse the atomic access code for the locking (in fact, we use the xchg code as this produces shorter critical sections). This patch uses the generic xchg based implementation for mutexes on ARMv6+, which introduces barriers to the lock/unlock operations and also has the benefit of removing a fair amount of inline assembly code. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nicolas Pitre <nico@linaro.org> Reported-by: Shan Kang <kangshan0910@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/asm-powerpc/mpc8260.h')
0 files changed, 0 insertions, 0 deletions