Home
last modified time | relevance | path

Searched refs:oldval (Results 1 – 25 of 86) sorted by relevance

1234

/Linux-v4.19/arch/ia64/include/asm/
Dfutex.h9 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument
17 : "+r" (r8), "=r" (oldval) \
23 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument
38 : "+r" (r8), "=r" (val), "=&r" (oldval), \
44 } while (unlikely (val != oldval)); \
51 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
57 __futex_atomic_op1("xchg4 %1=[%2],%3", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
61 __futex_atomic_op2("add %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
64 __futex_atomic_op2("or %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
67 __futex_atomic_op2("and %3=%3,%5", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
[all …]
/Linux-v4.19/arch/x86/include/asm/
Dfutex.h15 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument
24 : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
27 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument
41 : "=&a" (oldval), "=&r" (ret), \
48 int oldval = 0, ret, tem; in arch_futex_atomic_op_inuser() local
54 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
57 __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval, in arch_futex_atomic_op_inuser()
61 __futex_atomic_op2("orl %4, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
64 __futex_atomic_op2("andl %4, %3", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser()
67 __futex_atomic_op2("xorl %4, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
[all …]
/Linux-v4.19/arch/arm/include/asm/
Dfutex.h25 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument
39 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \
47 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
70 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) in futex_atomic_cmpxchg_inatomic()
84 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument
93 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \
101 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
119 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) in futex_atomic_cmpxchg_inatomic()
134 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local
143 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser()
[all …]
Dcmpxchg.h159 unsigned long oldval, res; in __cmpxchg() local
172 : "=&r" (res), "=&r" (oldval) in __cmpxchg()
184 : "=&r" (res), "=&r" (oldval) in __cmpxchg()
197 : "=&r" (res), "=&r" (oldval) in __cmpxchg()
204 oldval = 0; in __cmpxchg()
207 return oldval; in __cmpxchg()
248 unsigned long long oldval; in __cmpxchg64() local
262 : "=&r" (res), "=&r" (oldval), "+Qo" (*ptr) in __cmpxchg64()
266 return oldval; in __cmpxchg64()
Datomic.h113 int oldval; in atomic_cmpxchg_relaxed() local
124 : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter) in atomic_cmpxchg_relaxed()
129 return oldval; in atomic_cmpxchg_relaxed()
135 int oldval, newval; in atomic_fetch_add_unless() local
150 : "=&r" (oldval), "=&r" (newval), "=&r" (tmp), "+Qo" (v->counter) in atomic_fetch_add_unless()
154 if (oldval != u) in atomic_fetch_add_unless()
157 return oldval; in atomic_fetch_add_unless()
412 long long oldval; in ATOMIC64_OPS() local
424 : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter) in ATOMIC64_OPS()
429 return oldval; in ATOMIC64_OPS()
[all …]
/Linux-v4.19/arch/hexagon/include/asm/
Dfutex.h13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
29 : "=&r" (oldval), "=&r" (ret), "+m" (*uaddr) \
37 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
43 __futex_atomic_op("%1 = %4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
46 __futex_atomic_op("%1 = add(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
50 __futex_atomic_op("%1 = or(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
55 oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
58 __futex_atomic_op("%1 = xor(%0,%4)\n", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
68 *oval = oldval; in arch_futex_atomic_op_inuser()
74 futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, in futex_atomic_cmpxchg_inatomic() argument
[all …]
Dbitops.h47 int oldval; in test_and_clear_bit() local
56 : "=&r" (oldval) in test_and_clear_bit()
61 return oldval; in test_and_clear_bit()
71 int oldval; in test_and_set_bit() local
80 : "=&r" (oldval) in test_and_set_bit()
86 return oldval; in test_and_set_bit()
97 int oldval; in test_and_change_bit() local
106 : "=&r" (oldval) in test_and_change_bit()
111 return oldval; in test_and_change_bit()
/Linux-v4.19/arch/openrisc/include/asm/
Dfutex.h11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
27 : "=&r" (oldval), "=&r" (ret), "+m" (*uaddr) \
36 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
42 __futex_atomic_op("l.or %1,%4,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
45 __futex_atomic_op("l.add %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
48 __futex_atomic_op("l.or %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
51 __futex_atomic_op("l.and %1,%0,%4", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser()
54 __futex_atomic_op("l.xor %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
63 *oval = oldval; in arch_futex_atomic_op_inuser()
70 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/sh/include/asm/
Dfutex.h23 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
28 return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval); in futex_atomic_cmpxchg_inatomic()
34 u32 oldval, newval, prev; in arch_futex_atomic_op_inuser() local
40 ret = get_user(oldval, uaddr); in arch_futex_atomic_op_inuser()
49 newval = oldval + oparg; in arch_futex_atomic_op_inuser()
52 newval = oldval | oparg; in arch_futex_atomic_op_inuser()
55 newval = oldval & ~oparg; in arch_futex_atomic_op_inuser()
58 newval = oldval ^ oparg; in arch_futex_atomic_op_inuser()
67 ret = futex_atomic_cmpxchg_inatomic(&prev, uaddr, oldval, newval); in arch_futex_atomic_op_inuser()
68 } while (!ret && prev != oldval); in arch_futex_atomic_op_inuser()
[all …]
Dspinlock-llsc.h32 unsigned long oldval; in arch_spin_lock() local
43 : "=&z" (tmp), "=&r" (oldval) in arch_spin_lock()
64 unsigned long tmp, oldval; in arch_spin_trylock() local
74 : "=&z" (tmp), "=&r" (oldval) in arch_spin_trylock()
79 return oldval; in arch_spin_trylock()
155 unsigned long tmp, oldval; in arch_read_trylock() local
168 : "=&z" (tmp), "=&r" (oldval) in arch_read_trylock()
173 return (oldval > 0); in arch_read_trylock()
178 unsigned long tmp, oldval; in arch_write_trylock() local
191 : "=&z" (tmp), "=&r" (oldval) in arch_write_trylock()
[all …]
/Linux-v4.19/arch/sparc/include/asm/
Dfutex_64.h9 #define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \ argument
29 : "=&r" (ret), "=&r" (oldval), "=&r" (tem) \
36 int oldval = 0, ret, tem; in arch_futex_atomic_op_inuser() local
45 __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
48 __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
51 __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
54 __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
57 __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
66 *oval = oldval; in arch_futex_atomic_op_inuser()
73 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/mips/include/asm/
Dfutex.h21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
47 : "=r" (ret), "=&r" (oldval), \
76 : "=r" (ret), "=&r" (oldval), \
88 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
94 __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
99 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
103 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
107 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser()
111 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
120 *oval = oldval; in arch_futex_atomic_op_inuser()
[all …]
/Linux-v4.19/arch/s390/include/asm/
Dfutex.h10 #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ argument
20 : "=d" (ret), "=&d" (oldval), "=&d" (newval), \
28 int oldval = 0, newval, ret; in arch_futex_atomic_op_inuser() local
36 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
40 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
44 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
48 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
52 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
61 *oval = oldval; in arch_futex_atomic_op_inuser()
67 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/xtensa/include/asm/
Dfutex.h24 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
43 : "=&r" (oldval), "=&r" (ret) \
50 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
60 __futex_atomic_op("mov %1, %4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
63 __futex_atomic_op("add %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
67 __futex_atomic_op("or %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
71 __futex_atomic_op("and %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
75 __futex_atomic_op("xor %1, %0, %4", ret, oldval, uaddr, in arch_futex_atomic_op_inuser()
85 *oval = oldval; in arch_futex_atomic_op_inuser()
92 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/microblaze/include/asm/
Dfutex.h11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
27 : "=&r" (oldval), "=&r" (ret) \
35 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
41 __futex_atomic_op("or %1,%4,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
44 __futex_atomic_op("add %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
47 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
50 __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
53 __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
62 *oval = oldval; in arch_futex_atomic_op_inuser()
69 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/alpha/include/asm/
Dfutex.h12 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
25 : "=&r" (oldval), "=&r"(ret) \
32 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
38 __futex_atomic_op("mov %3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
41 __futex_atomic_op("addl %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
44 __futex_atomic_op("or %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
47 __futex_atomic_op("andnot %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
50 __futex_atomic_op("xor %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
59 *oval = oldval; in arch_futex_atomic_op_inuser()
66 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/nds32/include/asm/
Dfutex.h22 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument
33 : "=&r" (ret), "=&r" (oldval) \
38 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
56 :"r"(oldval), "r"(newval), "r"(uaddr), "i"(-EFAULT) in futex_atomic_cmpxchg_inatomic()
67 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
73 __futex_atomic_op("move %0, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser()
77 __futex_atomic_op("add %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser()
81 __futex_atomic_op("or %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser()
85 __futex_atomic_op("and %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser()
89 __futex_atomic_op("xor %0, %1, %3", ret, oldval, tmp, uaddr, in arch_futex_atomic_op_inuser()
[all …]
/Linux-v4.19/arch/powerpc/include/asm/
Dfutex.h13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument
29 : "=&r" (oldval), "=&r" (ret) \
36 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
42 __futex_atomic_op("mr %1,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
45 __futex_atomic_op("add %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
48 __futex_atomic_op("or %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
51 __futex_atomic_op("andc %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
54 __futex_atomic_op("xor %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
63 *oval = oldval; in arch_futex_atomic_op_inuser()
70 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/arch/arc/include/asm/
Dfutex.h21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument
42 : "=&r" (ret), "=&r" (oldval) \
49 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument
69 : "=&r" (ret), "=&r" (oldval) \
79 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
88 __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
92 __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
95 __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
98 __futex_atomic_op("bic %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
101 __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
[all …]
/Linux-v4.19/arch/arm64/include/asm/
Dfutex.h26 #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ argument
44 : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp) \
53 int oldval = 0, ret, tmp; in arch_futex_atomic_op_inuser() local
61 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser()
65 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser()
69 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser()
73 ret, oldval, uaddr, tmp, ~oparg); in arch_futex_atomic_op_inuser()
77 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser()
86 *oval = oldval; in arch_futex_atomic_op_inuser()
93 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
[all …]
/Linux-v4.19/include/asm-generic/
Dfutex.h31 int oldval, ret; in arch_futex_atomic_op_inuser() local
38 if (unlikely(get_user(oldval, uaddr) != 0)) in arch_futex_atomic_op_inuser()
42 tmp = oldval; in arch_futex_atomic_op_inuser()
72 *oval = oldval; in arch_futex_atomic_op_inuser()
92 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
102 if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { in futex_atomic_cmpxchg_inatomic()
117 int oldval = 0, ret; in arch_futex_atomic_op_inuser() local
134 *oval = oldval; in arch_futex_atomic_op_inuser()
141 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
/Linux-v4.19/arch/parisc/include/asm/
Dfutex.h39 int oldval, ret; in arch_futex_atomic_op_inuser() local
46 if (unlikely(get_user(oldval, uaddr) != 0)) in arch_futex_atomic_op_inuser()
50 tmp = oldval; in arch_futex_atomic_op_inuser()
80 *oval = oldval; in arch_futex_atomic_op_inuser()
87 u32 oldval, u32 newval) in futex_atomic_cmpxchg_inatomic() argument
113 if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) { in futex_atomic_cmpxchg_inatomic()
/Linux-v4.19/tools/include/asm-generic/
Datomic-gcc.h64 #define cmpxchg(ptr, oldval, newval) \ argument
65 __sync_val_compare_and_swap(ptr, oldval, newval)
67 static inline int atomic_cmpxchg(atomic_t *v, int oldval, int newval) in atomic_cmpxchg() argument
69 return cmpxchg(&(v)->counter, oldval, newval); in atomic_cmpxchg()
/Linux-v4.19/Documentation/translations/zh_CN/arm/
Dkernel_user_helpers.txt136 int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr);
140 r0 = oldval
156 仅在 *ptr 为 oldval 时原子保存 newval 于 *ptr 中。
163 typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
228 int __kuser_cmpxchg64(const int64_t *oldval,
234 r0 = 指向 oldval
250 仅在 *ptr 等于 *oldval 指向的 64 位值时,原子保存 *newval
259 typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval,
/Linux-v4.19/kernel/
Dsysctl_binary.c25 void __user *oldval, size_t oldlen, void __user *newval, size_t newlen);
906 void __user *oldval, size_t oldlen, void __user *newval, size_t newlen) in bin_dir() argument
913 void __user *oldval, size_t oldlen, void __user *newval, size_t newlen) in bin_string() argument
917 if (oldval && oldlen) { in bin_string()
922 result = vfs_read(file, oldval, oldlen, &pos); in bin_string()
927 lastp = oldval + copied - 1; in bin_string()
956 void __user *oldval, size_t oldlen, void __user *newval, size_t newlen) in bin_intvec() argument
967 if (oldval && oldlen) { in bin_intvec()
968 unsigned __user *vec = oldval; in bin_intvec()
1029 void __user *oldval, size_t oldlen, void __user *newval, size_t newlen) in bin_ulongvec() argument
[all …]

1234