/usr/src/linux-headers-5.15.0-190/arch/csky/include/asm
NameSizeModeActions
vdso/-0755rm
addrspace.h2310644editdlrm
asid.h24400644editdlrm
barrier.h25330644editdlrm
bitops.h13630644editdlrm
bug.h5650644editdlrm
cache.h8610644editdlrm
cacheflush.h1930644editdlrm
checksum.h9440644editdlrm
clocksource.h1590644editdlrm
cmpxchg.h18240644editdlrm
elf.h27230644editdlrm
fixmap.h7470644editdlrm
ftrace.h5580644editdlrm
futex.h26050644editdlrm
highmem.h11140644editdlrm
io.h13840644editdlrm
irqflags.h11320644editdlrm
irq_work.h2080644editdlrm
Kbuild1990644editdlrm
kprobes.h11580644editdlrm
memory.h6570644editdlrm
mmu.h2160644editdlrm
mmu_context.h9590644editdlrm
page.h27570644editdlrm
pci.h6800644editdlrm
perf_event.h3590644editdlrm
pgalloc.h16570644editdlrm
pgtable.h69850644editdlrm
probes.h5540644editdlrm
processor.h25250644editdlrm
ptrace.h24760644editdlrm
reg_ops.h3820644editdlrm
seccomp.h2830644editdlrm
segment.h1870644editdlrm
shmparam.h1970644editdlrm
smp.h6260644editdlrm
spinlock.h18920644editdlrm
spinlock_types.h5040644editdlrm
stackprotector.h7050644editdlrm
string.h2330644editdlrm
switch_to.h9230644editdlrm
syscall.h15630644editdlrm
syscalls.h3510644editdlrm
tcm.h6650644editdlrm
thread_info.h28660644editdlrm
tlb.h5080644editdlrm
tlbflush.h8240644editdlrm
traps.h7960644editdlrm
uaccess.h52710644editdlrm
unistd.h1060644editdlrm
uprobes.h6690644editdlrm
vdso.h7840644editdlrm
vmalloc.h900644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/arch/csky/include/asm/cmpxchg.h (1824B)
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_CSKY_CMPXCHG_H #define __ASM_CSKY_CMPXCHG_H #ifdef CONFIG_SMP #include extern void __bad_xchg(void); #define __xchg_relaxed(new, ptr, size) \ ({ \ __typeof__(ptr) __ptr = (ptr); \ __typeof__(new) __new = (new); \ __typeof__(*(ptr)) __ret; \ unsigned long tmp; \ switch (size) { \ case 4: \ asm volatile ( \ "1: ldex.w %0, (%3) \n" \ " mov %1, %2 \n" \ " stex.w %1, (%3) \n" \ " bez %1, 1b \n" \ : "=&r" (__ret), "=&r" (tmp) \ : "r" (__new), "r"(__ptr) \ :); \ break; \ default: \ __bad_xchg(); \ } \ __ret; \ }) #define arch_xchg_relaxed(ptr, x) \ (__xchg_relaxed((x), (ptr), sizeof(*(ptr)))) #define __cmpxchg_relaxed(ptr, old, new, size) \ ({ \ __typeof__(ptr) __ptr = (ptr); \ __typeof__(new) __new = (new); \ __typeof__(new) __tmp; \ __typeof__(old) __old = (old); \ __typeof__(*(ptr)) __ret; \ switch (size) { \ case 4: \ asm volatile ( \ "1: ldex.w %0, (%3) \n" \ " cmpne %0, %4 \n" \ " bt 2f \n" \ " mov %1, %2 \n" \ " stex.w %1, (%3) \n" \ " bez %1, 1b \n" \ "2: \n" \ : "=&r" (__ret), "=&r" (__tmp) \ : "r" (__new), "r"(__ptr), "r"(__old) \ :); \ break; \ default: \ __bad_xchg(); \ } \ __ret; \ }) #define arch_cmpxchg_relaxed(ptr, o, n) \ (__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr)))) #define arch_cmpxchg(ptr, o, n) \ ({ \ __typeof__(*(ptr)) __ret; \ __smp_release_fence(); \ __ret = arch_cmpxchg_relaxed(ptr, o, n); \ __smp_acquire_fence(); \ __ret; \ }) #else #include #endif #endif /* __ASM_CSKY_CMPXCHG_H */