/linux/arch/arc/include/asm/ |
H A D | futex.h | 18 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 40 : "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \ 46 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 67 : "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \ 73 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 87 __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 91 __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 94 __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 97 __futex_atomic_op("bic %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 100 __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/x86/include/asm/ |
H A D | futex.h | 15 #define unsafe_atomic_op1(insn, oval, uaddr, oparg, label) \ argument 22 : "0" (oparg), "1" (0)); \ 29 #define unsafe_atomic_op2(insn, oval, uaddr, oparg, label) \ argument 42 : "r" (oparg), "1" (0)); \ 48 static __always_inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 56 unsafe_atomic_op1("xchgl %0, %2", oval, uaddr, oparg, Efault); in arch_futex_atomic_op_inuser() 60 uaddr, oparg, Efault); in arch_futex_atomic_op_inuser() 63 unsafe_atomic_op2("orl %4, %3", oval, uaddr, oparg, Efault); in arch_futex_atomic_op_inuser() 66 unsafe_atomic_op2("andl %4, %3", oval, uaddr, ~oparg, Efault); in arch_futex_atomic_op_inuser() 69 unsafe_atomic_op2("xorl %4, %3", oval, uaddr, oparg, Efault); in arch_futex_atomic_op_inuser()
|
/linux/arch/sparc/include/asm/ |
H A D | futex_64.h | 9 #define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \ argument 30 : "r" (uaddr), "r" (oparg), "i" (-EFAULT) \ 33 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 43 __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 46 __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 49 __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 52 __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 55 __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/openrisc/include/asm/ |
H A D | futex.h | 11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 28 : "i" (-EFAULT), "r" (oparg) \ 34 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 43 __futex_atomic_op("l.or %1,%4,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 46 __futex_atomic_op("l.add %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 49 __futex_atomic_op("l.or %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 52 __futex_atomic_op("l.and %1,%0,%4", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 55 __futex_atomic_op("l.xor %1,%0,%4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/hexagon/include/asm/ |
H A D | futex.h | 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 30 : "r" (uaddr), "r" (oparg), "i" (-EFAULT) \ 35 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 44 __futex_atomic_op("%1 = %4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 oparg); in arch_futex_atomic_op_inuser() 52 oparg); in arch_futex_atomic_op_inuser() 56 oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 60 oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/microblaze/include/asm/ |
H A D | futex.h | 11 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 28 : "r" (uaddr), "i" (-EFAULT), "r" (oparg) \ 33 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 42 __futex_atomic_op("or %1,%4,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("add %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 54 __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/mips/include/asm/ |
H A D | futex.h | 25 #define __futex_atomic_op(op, insn, ret, oldval, uaddr, oparg) \ argument 53 : "0" (0), GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oparg), \ 83 : "0" (0), GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oparg), \ 88 ret = futex_atomic_op_inuser_local(op, oparg, oval, uaddr); \ 93 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 102 __futex_atomic_op(op, "move $1, %z5", 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() 115 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 119 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/arm/include/asm/ |
H A D | futex.h | 25 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 40 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 84 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 94 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 133 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 146 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 149 __futex_atomic_op("add %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 152 __futex_atomic_op("orr %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 155 __futex_atomic_op("and %0, %1, %4", ret, oldval, tmp, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 158 __futex_atomic_op("eor %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/xtensa/include/asm/ |
H A D | futex.h | 44 : [addr] "r" (uaddr), [oparg] "r" (arg), \ 69 : [oparg] "r" (arg), [fault] "I" (-EFAULT) \ 73 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 85 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 89 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 93 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 97 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 101 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 112 return futex_atomic_op_inuser_local(op, oparg, oval, uaddr); in arch_futex_atomic_op_inuser()
|
/linux/arch/s390/include/asm/ |
H A D | futex.h | 11 #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ argument 24 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \ 27 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 35 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 39 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 43 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 ret, oldval, newval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/alpha/include/asm/ |
H A D | futex.h | 12 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 26 : "r" (uaddr), "r"(oparg) \ 29 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 39 __futex_atomic_op("mov %3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 42 __futex_atomic_op("addl %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("or %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("andnot %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("xor %0,%3,%1\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/include/asm-generic/ |
H A D | futex.h | 18 #define arch_futex_atomic_op_inuser(op, oparg, oval, uaddr) \ argument 19 futex_atomic_op_inuser_local(op, oparg, oval, uaddr) 38 futex_atomic_op_inuser_local(int op, u32 oparg, int *oval, u32 __user *uaddr) in futex_atomic_op_inuser_local() argument 54 tmp = oparg; in futex_atomic_op_inuser_local() 57 tmp += oparg; in futex_atomic_op_inuser_local() 60 tmp |= oparg; in futex_atomic_op_inuser_local() 63 tmp &= ~oparg; in futex_atomic_op_inuser_local() 66 tmp ^= oparg; in futex_atomic_op_inuser_local()
|
/linux/arch/loongarch/include/asm/ |
H A D | futex.h | 14 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 26 : "0" (0), "ZC" (*uaddr), "Jr" (oparg) \ 31 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 39 __futex_atomic_op("move $t0, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 42 __futex_atomic_op("add.w $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 45 __futex_atomic_op("or $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("and $t0, %1, %z5", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("xor $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/powerpc/include/asm/ |
H A D | futex.h | 12 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 28 : "b" (uaddr), "i" (-EFAULT), "r" (oparg) \ 31 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 41 __futex_atomic_op("mr %1,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 44 __futex_atomic_op("add %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 __futex_atomic_op("or %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 50 __futex_atomic_op("andc %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 53 __futex_atomic_op("xor %1,%0,%4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/csky/include/asm/ |
H A D | futex.h | 14 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 35 : [op] "Jr" (oparg), [e] "jr" (-EFAULT) \ 42 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 52 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 56 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 60 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 64 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 68 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/riscv/include/asm/ |
H A D | futex.h | 22 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 31 : [op] "Jr" (oparg) \ 37 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 47 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 55 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 59 ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 63 ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/arm64/include/asm/ |
H A D | futex.h | 15 #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ argument 35 : "r" (oparg), "Ir" (-EAGAIN) \ 41 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr) in arch_futex_atomic_op_inuser() argument 52 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 56 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 60 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser() 64 ret, oldval, uaddr, tmp, ~oparg); in arch_futex_atomic_op_inuser() 68 ret, oldval, uaddr, tmp, oparg); in arch_futex_atomic_op_inuser()
|
/linux/arch/sh/include/asm/ |
H A D | futex.h | 29 static inline int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, in arch_futex_atomic_op_inuser() argument 42 newval = oparg; in arch_futex_atomic_op_inuser() 45 newval = oldval + oparg; in arch_futex_atomic_op_inuser() 48 newval = oldval | oparg; in arch_futex_atomic_op_inuser() 51 newval = oldval & ~oparg; in arch_futex_atomic_op_inuser() 54 newval = oldval ^ oparg; in arch_futex_atomic_op_inuser()
|
/linux/arch/parisc/include/asm/ |
H A D | futex.h | 35 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 58 tmp = oparg; in arch_futex_atomic_op_inuser() 61 tmp += oparg; in arch_futex_atomic_op_inuser() 64 tmp |= oparg; in arch_futex_atomic_op_inuser() 67 tmp &= ~oparg; in arch_futex_atomic_op_inuser() 70 tmp ^= oparg; in arch_futex_atomic_op_inuser()
|
/linux/kernel/futex/ |
H A D | waitwake.c | 207 int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 11); in futex_atomic_op_inuser() local 212 if (oparg < 0 || oparg > 31) { in futex_atomic_op_inuser() 219 get_task_comm(comm, current), oparg); in futex_atomic_op_inuser() 220 oparg &= 31; in futex_atomic_op_inuser() 222 oparg = 1 << oparg; in futex_atomic_op_inuser() 226 ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); in futex_atomic_op_inuser()
|
/linux/arch/um/kernel/skas/ |
H A D | uaccess.c | 251 int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 282 *uaddr = oparg; in arch_futex_atomic_op_inuser() 285 *uaddr += oparg; in arch_futex_atomic_op_inuser() 288 *uaddr |= oparg; in arch_futex_atomic_op_inuser() 291 *uaddr &= ~oparg; in arch_futex_atomic_op_inuser() 294 *uaddr ^= oparg; in arch_futex_atomic_op_inuser()
|
/linux/include/uapi/linux/ |
H A D | futex.h | 201 #define FUTEX_OP(op, oparg, cmp, cmparg) \ argument 203 | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
|
/linux/arch/um/include/asm/ |
H A D | futex.h | 10 int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr);
|