kernel_optimize_test/arch/arm/include/asm
Mathieu Desnoyers ecd322c9b3 [ARM] Add cmpxchg support for ARMv6+ systems (v5)
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>
2009-05-28 21:10:31 +01:00
..
hardware [ARM] smp: fix cpumask usage in ARM SMP code 2009-05-17 16:22:46 +01:00
mach
a.out-core.h
a.out.h
assembler.h [ARM] barriers: improve xchg, bitops and atomic SMP barriers 2009-05-28 19:39:27 +01:00
atomic.h [ARM] barriers: improve xchg, bitops and atomic SMP barriers 2009-05-28 19:39:27 +01:00
auxvec.h
bitops.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cachetype.h
checksum.h
clkdev.h
cpu-multi32.h
cpu-single.h
cpu.h
cputime.h
cputype.h
current.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
domain.h
ecard.h
elf.h [ARM] 5507/1: support R_ARM_MOVW_ABS_NC and MOVT_ABS relocation types 2009-05-07 17:21:01 +01:00
emergency-restart.h
errno.h
fb.h
fcntl.h
fiq.h
fixmap.h
flat.h
floppy.h
fpstate.h
ftrace.h
futex.h
glue.h
gpio.h
hardirq.h
highmem.h
hw_irq.h
hwcap.h
ide.h
io.h
ioctl.h
ioctls.h
ipcbuf.h
irq_regs.h
irq.h
irqflags.h
Kbuild
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
leds.h
limits.h
linkage.h
local.h
locks.h
mc146818rtc.h
memory.h
mman.h
mmu_context.h
mmu.h
mmzone.h
module.h
msgbuf.h
mtd-xip.h
mutex.h
nwflash.h
page-nommu.h
page.h
param.h
parport.h
pci.h
percpu.h
pgalloc.h
pgtable-hwdef.h
pgtable-nommu.h
pgtable.h
poll.h
posix_types.h
proc-fns.h
processor.h
procinfo.h
ptrace.h
resource.h
scatterlist.h
sections.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sizes.h [ARM] 5447/1: Add SZ_32K 2009-04-08 20:35:57 +01:00
smp.h [ARM] smp: fix cpumask usage in ARM SMP code 2009-05-17 16:22:46 +01:00
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h
stacktrace.h
stat.h
statfs.h
string.h
suspend.h
swab.h
system.h [ARM] Add cmpxchg support for ARMv6+ systems (v5) 2009-05-28 21:10:31 +01:00
termbits.h
termios.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h [ARM] 5450/1: Flush only the needed range when unmapping a VMA 2009-04-15 10:01:02 +01:00
tlbflush.h
topology.h
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h [ARM] 5456/1: add sys_preadv and sys_pwritev 2009-04-20 14:01:39 +01:00
unwind.h
user.h
vfp.h
vfpmacros.h
vga.h
xor.h