/Linux-v4.19/arch/x86/include/asm/ |
D | futex.h | 15 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument 25 : "i" (-EFAULT), "0" (oparg), "1" (0)) 27 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument 43 : "r" (oparg), "i" (-EFAULT), "1" (0)) 45 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 54 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 58 uaddr, oparg); 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()
|
/Linux-v4.19/arch/arc/include/asm/ |
D | futex.h | 21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 43 : "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \ 49 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\ argument 70 : "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \ 76 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 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()
|
/Linux-v4.19/arch/ia64/include/asm/ |
D | futex.h | 9 #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ argument 18 : "r" (uaddr), "r" (oparg) \ 23 #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ argument 40 : "r" (uaddr), "r" (oparg) \ 49 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 58 oparg); 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() 68 ~oparg); in arch_futex_atomic_op_inuser() 71 __futex_atomic_op2("xor %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/arch/hexagon/include/asm/ |
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 43 __futex_atomic_op("%1 = %4\n", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 47 oparg); in arch_futex_atomic_op_inuser() 51 oparg); in arch_futex_atomic_op_inuser() 55 oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 59 oparg); in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/arch/openrisc/include/asm/ |
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 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()
|
/Linux-v4.19/arch/sparc/include/asm/ |
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 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()
|
/Linux-v4.19/arch/xtensa/include/asm/ |
D | futex.h | 24 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 44 : "r" (uaddr), "I" (-EFAULT), "r" (oparg) \ 47 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 60 __futex_atomic_op("mov %1, %4", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 64 oparg); in arch_futex_atomic_op_inuser() 68 oparg); in arch_futex_atomic_op_inuser() 72 ~oparg); in arch_futex_atomic_op_inuser() 76 oparg); in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/arch/microblaze/include/asm/ |
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 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()
|
/Linux-v4.19/arch/alpha/include/asm/ |
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 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()
|
/Linux-v4.19/arch/nds32/include/asm/ |
D | futex.h | 22 #define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ argument 34 : "r" (uaddr), "r" (oparg), "i" (-EFAULT) \ 65 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 74 oparg); in arch_futex_atomic_op_inuser() 78 oparg); in arch_futex_atomic_op_inuser() 82 oparg); in arch_futex_atomic_op_inuser() 86 ~oparg); in arch_futex_atomic_op_inuser() 90 oparg); in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/arch/mips/include/asm/ |
D | futex.h | 21 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 49 : "0" (0), GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oparg), \ 78 : "0" (0), GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oparg), \ 86 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 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()
|
/Linux-v4.19/arch/arm/include/asm/ |
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) \ 132 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 143 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 146 __futex_atomic_op("add %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 149 __futex_atomic_op("orr %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser() 152 __futex_atomic_op("and %0, %1, %4", ret, oldval, tmp, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 155 __futex_atomic_op("eor %0, %1, %4", ret, oldval, tmp, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/arch/powerpc/include/asm/ |
D | futex.h | 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 30 : "b" (uaddr), "i" (-EFAULT), "r" (oparg) \ 33 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 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()
|
/Linux-v4.19/arch/s390/include/asm/ |
D | futex.h | 10 #define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg) \ argument 22 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \ 25 static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, in arch_futex_atomic_op_inuser() argument 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()
|
/Linux-v4.19/arch/arm64/include/asm/ |
D | futex.h | 26 #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ argument 45 : "r" (oparg), "Ir" (-EFAULT) \ 51 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr) in arch_futex_atomic_op_inuser() argument 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()
|
/Linux-v4.19/include/asm-generic/ |
D | futex.h | 29 arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 46 tmp = oparg; in arch_futex_atomic_op_inuser() 49 tmp += oparg; in arch_futex_atomic_op_inuser() 52 tmp |= oparg; in arch_futex_atomic_op_inuser() 55 tmp &= ~oparg; in arch_futex_atomic_op_inuser() 58 tmp ^= oparg; in arch_futex_atomic_op_inuser() 115 arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument
|
/Linux-v4.19/arch/sh/include/asm/ |
D | futex.h | 31 static inline int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, in arch_futex_atomic_op_inuser() argument 46 newval = oparg; 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()
|
/Linux-v4.19/arch/parisc/include/asm/ |
D | futex.h | 36 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 54 tmp = oparg; in arch_futex_atomic_op_inuser() 57 tmp += oparg; in arch_futex_atomic_op_inuser() 60 tmp |= oparg; in arch_futex_atomic_op_inuser() 63 tmp &= ~oparg; in arch_futex_atomic_op_inuser() 66 tmp ^= oparg; in arch_futex_atomic_op_inuser()
|
/Linux-v4.19/include/uapi/linux/ |
D | futex.h | 149 #define FUTEX_OP(op, oparg, cmp, cmparg) \ argument 151 | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
|
/Linux-v4.19/kernel/ |
D | futex.c | 1567 int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 11); in futex_atomic_op_inuser() local 1572 if (oparg < 0 || oparg > 31) { in futex_atomic_op_inuser() 1579 get_task_comm(comm, current), oparg); in futex_atomic_op_inuser() 1580 oparg &= 31; in futex_atomic_op_inuser() 1582 oparg = 1 << oparg; in futex_atomic_op_inuser() 1588 ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); in futex_atomic_op_inuser()
|