android_kernel_google_msm/arch
Will Deacon 9effb1b259 ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
commit a76d7bd96d 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>
2012-10-02 10:30:49 -07:00
..
alpha Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts 2012-10-02 10:29:55 -07:00
arm ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+ 2012-10-02 10:30:49 -07:00
avr32
blackfin
c6x
cris
frv frv: delete incorrect task prototypes causing compile fail 2012-05-17 18:00:51 -07:00
h8300
hexagon
ia64 random: remove rand_initialize_irq() 2012-08-15 08:10:29 -07:00
m32r
m68k m68k: Correct the Atari ALLOWINT definition 2012-08-09 08:31:53 -07:00
microblaze microblaze: Do not select GENERIC_GPIO by default 2012-06-10 00:36:05 +09:00
mips MIPS: mm: Add compound tail page _mapcount when mapped 2012-10-02 10:30:09 -07:00
mn10300
openrisc
parisc PARISC: Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts 2012-09-14 10:00:33 -07:00
powerpc powerpc/85xx: p1022ds: fix DIU/LBC switching with NAND enabled 2012-10-02 10:30:37 -07:00
s390 oprofile, s390: Fix uninitialized memory access when writing to oprofilefs 2012-10-02 10:29:55 -07:00
score
sh
sparc KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat 2012-06-01 15:18:16 +08:00
tile tile: fix bug where fls(0) was not returning 0 2012-06-01 15:18:27 +08:00
um um: Implement a custom pte_same() function 2012-06-01 15:18:18 +08:00
unicore32
x86 x86: Fix boot on Twinhead H12Y 2012-10-02 10:30:33 -07:00
xtensa
.gitignore
Kconfig