https://github.com/torvalds/linux
Revision ecd322c9b3e4ac70f9f108badde3eb6b99c7993d authored by Mathieu Desnoyers on 28 May 2009, 20:07:39 UTC, committed by Russell King on 28 May 2009, 20:10:31 UTC
Add cmpxchg/cmpxchg64 support for ARMv6K and ARMv7 systems (original patch from Catalin Marinas <catalin.marinas@arm.com>) The cmpxchg and cmpxchg64 functions can be implemented using the LDREX*/STREX* instructions. Since operand lengths other than 32bit are required, the full implementations are only available if the ARMv6K extensions are present (for the LDREXB, LDREXH and LDREXD instructions). For ARMv6, only 32-bits cmpxchg is available. Mathieu : Make cmpxchg_local always available with best implementation for all type sizes (1, 2, 4 bytes). Make cmpxchg64_local always available. Use "Ir" constraint for "old" operand, like atomic.h atomic_cmpxchg does. Change since v3 : - Add "memory" clobbers (thanks to Nicolas Pitre) - removed __asmeq(), only needed for old compilers, very unlikely on ARMv6+. Note : ARMv7-M should eventually be ifdefed-out of cmpxchg64. But it's not supported by the Linux kernel currently. Put back arm < v6 cmpxchg support. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Catalin Marinas <catalin.marinas@arm.com> CC: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent bac4e96
Tip revision: ecd322c9b3e4ac70f9f108badde3eb6b99c7993d authored by Mathieu Desnoyers on 28 May 2009, 20:07:39 UTC
[ARM] Add cmpxchg support for ARMv6+ systems (v5)
[ARM] Add cmpxchg support for ARMv6+ systems (v5)
Tip revision: ecd322c
File | Mode | Size |
---|---|---|
Documentation | ||
arch | ||
block | ||
crypto | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
usr | ||
virt | ||
.gitignore | -rw-r--r-- | 885 bytes |
.mailmap | -rw-r--r-- | 3.9 KB |
COPYING | -rw-r--r-- | 18.3 KB |
CREDITS | -rw-r--r-- | 91.6 KB |
Kbuild | -rw-r--r-- | 2.4 KB |
MAINTAINERS | -rw-r--r-- | 144.6 KB |
Makefile | -rw-r--r-- | 53.8 KB |
README | -rw-r--r-- | 16.7 KB |
REPORTING-BUGS | -rw-r--r-- | 3.1 KB |
Computing file changes ...