/linux-6.1.9/arch/arc/include/asm/ |
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-6.1.9/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 59 oparg); in arch_futex_atomic_op_inuser() 62 __futex_atomic_op2("add %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 65 __futex_atomic_op2("or %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 69 ~oparg); in arch_futex_atomic_op_inuser() 72 __futex_atomic_op2("xor %3=%3,%5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux-6.1.9/arch/x86/include/asm/ |
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-6.1.9/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 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-6.1.9/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 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-6.1.9/arch/loongarch/include/asm/ |
D | futex.h | 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ argument 31 : "0" (0), "ZC" (*uaddr), "Jr" (oparg), \ 37 arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 45 __futex_atomic_op("move $t0, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 48 __futex_atomic_op("add.w $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 51 __futex_atomic_op("or $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser() 54 __futex_atomic_op("and $t0, %1, %z5", ret, oldval, uaddr, ~oparg); in arch_futex_atomic_op_inuser() 57 __futex_atomic_op("xor $t0, %1, %z5", ret, oldval, uaddr, oparg); in arch_futex_atomic_op_inuser()
|
/linux-6.1.9/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 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-6.1.9/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 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-6.1.9/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) \ 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-6.1.9/arch/mips/include/asm/ |
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-6.1.9/arch/xtensa/include/asm/ |
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-6.1.9/include/asm-generic/ |
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-6.1.9/arch/s390/include/asm/ |
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-6.1.9/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 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-6.1.9/arch/powerpc/include/asm/ |
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-6.1.9/arch/csky/include/asm/ |
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-6.1.9/arch/riscv/include/asm/ |
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-6.1.9/arch/arm64/include/asm/ |
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-6.1.9/arch/sh/include/asm/ |
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-6.1.9/arch/parisc/include/asm/ |
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-6.1.9/kernel/futex/ |
D | waitwake.c | 192 int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 11); in futex_atomic_op_inuser() local 197 if (oparg < 0 || oparg > 31) { in futex_atomic_op_inuser() 204 get_task_comm(comm, current), oparg); in futex_atomic_op_inuser() 205 oparg &= 31; in futex_atomic_op_inuser() 207 oparg = 1 << oparg; in futex_atomic_op_inuser() 211 ret = arch_futex_atomic_op_inuser(op, oparg, &oldval, uaddr); in futex_atomic_op_inuser()
|
/linux-6.1.9/arch/um/kernel/skas/ |
D | uaccess.c | 249 int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) in arch_futex_atomic_op_inuser() argument 280 *uaddr = oparg; in arch_futex_atomic_op_inuser() 283 *uaddr += oparg; in arch_futex_atomic_op_inuser() 286 *uaddr |= oparg; in arch_futex_atomic_op_inuser() 289 *uaddr &= ~oparg; in arch_futex_atomic_op_inuser() 292 *uaddr ^= oparg; in arch_futex_atomic_op_inuser()
|
/linux-6.1.9/include/uapi/linux/ |
D | futex.h | 176 #define FUTEX_OP(op, oparg, cmp, cmparg) \ argument 178 | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
|
/linux-6.1.9/arch/um/include/asm/ |
D | futex.h | 10 int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr);
|