/arch/s390/include/asm/ |
D | rwsem.h | 65 signed long old, new; in __down_read() local 81 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read() 93 signed long old, new; in __down_read_trylock() local 113 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read_trylock() 124 signed long old, new, tmp; in __down_write_nested() local 141 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_write_nested() 186 signed long old, new; in __up_read() local 202 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __up_read() 205 if (new < 0) in __up_read() 206 if ((new & RWSEM_ACTIVE_MASK) == 0) in __up_read() [all …]
|
D | atomic.h | 84 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) argument 86 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument 91 : "d" (new), "Q" (v->counter) in atomic_cmpxchg() 170 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) argument 173 long long old, long long new) in atomic64_cmpxchg() argument 178 : "d" (new), "Q" (v->counter) in atomic64_cmpxchg() 210 static inline long long atomic64_xchg(atomic64_t *v, long long new) in atomic64_xchg() argument 212 register_pair rp_new = {.pair = new}; in atomic64_xchg() 226 long long old, long long new) in atomic64_cmpxchg() argument 229 register_pair rp_new = {.pair = new}; in atomic64_cmpxchg() [all …]
|
D | cmpxchg.h | 94 unsigned long new, int size) in __cmpxchg() argument 117 : "d" (old << shift), "d" (new << shift), in __cmpxchg() 138 : "d" (old << shift), "d" (new << shift), in __cmpxchg() 146 : "0" (old), "d" (new), "Q" (*(int *) ptr) in __cmpxchg() 154 : "0" (old), "d" (new), "Q" (*(long *) ptr) in __cmpxchg() 175 unsigned long long new) in __cmpxchg64() argument 178 register_pair rp_new = {.pair = new}; in __cmpxchg64() 197 unsigned long new, int size) in __cmpxchg_local() argument 206 return __cmpxchg(ptr, old, new, size); in __cmpxchg_local() 208 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
|
/arch/sparc/kernel/ |
D | ftrace.c | 25 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument 46 : [new] "0" (new), [old] "r" (old), [ip] "r" (ip) in ftrace_modify_code() 49 if (replaced != old && replaced != new) in ftrace_modify_code() 58 u32 old, new; in ftrace_make_nop() local 61 new = ftrace_nop; in ftrace_make_nop() 62 return ftrace_modify_code(ip, old, new); in ftrace_make_nop() 68 u32 old, new; in ftrace_make_call() local 71 new = ftrace_call_replace(ip, addr); in ftrace_make_call() 72 return ftrace_modify_code(ip, old, new); in ftrace_make_call() 78 u32 old, new; in ftrace_update_ftrace_func() local [all …]
|
/arch/avr32/include/asm/ |
D | cmpxchg.h | 47 unsigned long new) in __cmpxchg_u32() argument 60 : "m"(m), [old] "ir"(old), [new] "r"(new) in __cmpxchg_u32() 66 volatile int * m, unsigned long old, unsigned long new); 76 unsigned long new, int size) in __cmpxchg() argument 80 return __cmpxchg_u32(ptr, old, new); in __cmpxchg() 82 return __cmpxchg_u64(ptr, old, new); in __cmpxchg() 89 #define cmpxchg(ptr, old, new) \ argument 91 (unsigned long)(new), \ 98 unsigned long new, int size) in __cmpxchg_local() argument 102 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local() [all …]
|
/arch/sparc/include/asm/ |
D | cmpxchg_64.h | 71 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument 74 : "=&r" (new) in __cmpxchg_u32() 75 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32() 78 return new; in __cmpxchg_u32() 82 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument 85 : "=&r" (new) in __cmpxchg_u64() 86 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64() 89 return new; in __cmpxchg_u64() 97 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument 101 return __cmpxchg_u32(ptr, old, new); in __cmpxchg() [all …]
|
/arch/arm/kernel/ |
D | ftrace.c | 87 unsigned long new, bool validate) in ftrace_modify_code() argument 93 new = __opcode_to_mem_thumb32(new); in ftrace_modify_code() 96 new = __opcode_to_mem_arm(new); in ftrace_modify_code() 107 if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) in ftrace_modify_code() 118 unsigned long new; in ftrace_update_ftrace_func() local 122 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func() 124 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 129 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func() 131 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 140 unsigned long new, old; in ftrace_make_call() local [all …]
|
/arch/alpha/include/asm/ |
D | xchg.h | 137 ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg() argument 157 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg() 158 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg() 164 ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new) in ____cmpxchg() argument 184 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg() 185 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg() 191 ____cmpxchg(_u32, volatile int *m, int old, int new) in ____cmpxchg() argument 208 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg() 214 ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new) in ____cmpxchg() argument 231 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg() [all …]
|
/arch/ia64/include/asm/ |
D | atomic.h | 32 __s32 old, new; in ia64_atomic_add() local 38 new = old + i; in ia64_atomic_add() 39 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); in ia64_atomic_add() 40 return new; in ia64_atomic_add() 46 __s64 old, new; in ia64_atomic64_add() local 52 new = old + i; in ia64_atomic64_add() 53 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); in ia64_atomic64_add() 54 return new; in ia64_atomic64_add() 60 __s32 old, new; in ia64_atomic_sub() local 66 new = old - i; in ia64_atomic_sub() [all …]
|
D | rwsem.h | 55 long old, new; in __down_write() local 59 new = old + RWSEM_ACTIVE_WRITE_BIAS; in __down_write() 60 } while (cmpxchg_acq(&sem->count, old, new) != old); in __down_write() 84 long old, new; in __up_write() local 88 new = old - RWSEM_ACTIVE_WRITE_BIAS; in __up_write() 89 } while (cmpxchg_rel(&sem->count, old, new) != old); in __up_write() 91 if (new < 0 && (new & RWSEM_ACTIVE_MASK) == 0) in __up_write() 127 long old, new; in __downgrade_write() local 131 new = old - RWSEM_WAITING_BIAS; in __downgrade_write() 132 } while (cmpxchg_rel(&sem->count, old, new) != old); in __downgrade_write()
|
D | bitops.h | 40 __u32 bit, old, new; in set_bit() local 49 new = old | bit; in set_bit() 50 } while (cmpxchg_acq(m, old, new) != old); in set_bit() 87 __u32 mask, old, new; in clear_bit() local 96 new = old & mask; in clear_bit() 97 } while (cmpxchg_acq(m, old, new) != old); in clear_bit() 111 __u32 mask, old, new; in clear_bit_unlock() local 120 new = old & mask; in clear_bit_unlock() 121 } while (cmpxchg_rel(m, old, new) != old); in clear_bit_unlock() 136 __u32 const new = *m & ~(1 << (nr & 31)); in __clear_bit_unlock() local [all …]
|
/arch/arm/include/asm/ |
D | cmpxchg.h | 137 unsigned long new, int size) in __cmpxchg() argument 151 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg() 163 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg() 176 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg() 189 unsigned long new, int size) in __cmpxchg_mb() argument 194 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb() 208 unsigned long new, int size) in __cmpxchg_local() argument 216 ret = __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local() 220 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_local() 241 unsigned long long new) in __cmpxchg64() argument [all …]
|
/arch/x86/um/ |
D | bugs_32.c | 24 struct sigaction old, new; in arch_check_bugs() local 27 new.sa_handler = cmov_sigill_test_handler; in arch_check_bugs() 30 new.sa_flags = SA_NODEFER; in arch_check_bugs() 31 sigemptyset(&new.sa_mask); in arch_check_bugs() 32 sigaction(SIGILL, &new, &old); in arch_check_bugs() 41 sigaction(SIGILL, &old, &new); in arch_check_bugs()
|
/arch/powerpc/include/asm/ |
D | cmpxchg.h | 150 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument 166 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32() 174 unsigned long new) in __cmpxchg_u32_local() argument 188 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local() 196 __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) in __cmpxchg_u64() argument 211 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64() 219 unsigned long new) in __cmpxchg_u64_local() argument 232 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u64_local() 244 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, in __cmpxchg() argument 249 return __cmpxchg_u32(ptr, old, new); in __cmpxchg() [all …]
|
/arch/x86/lib/ |
D | cmpxchg.c | 10 unsigned long cmpxchg_386_u8(volatile void *ptr, u8 old, u8 new) in cmpxchg_386_u8() argument 19 *(u8 *)ptr = new; in cmpxchg_386_u8() 25 unsigned long cmpxchg_386_u16(volatile void *ptr, u16 old, u16 new) in cmpxchg_386_u16() argument 34 *(u16 *)ptr = new; in cmpxchg_386_u16() 40 unsigned long cmpxchg_386_u32(volatile void *ptr, u32 old, u32 new) in cmpxchg_386_u32() argument 49 *(u32 *)ptr = new; in cmpxchg_386_u32()
|
/arch/m32r/include/asm/ |
D | cmpxchg.h | 113 __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) in __cmpxchg_u32() argument 131 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32() 144 unsigned int new) in __cmpxchg_local_u32() argument 162 : "r" (p), "r" (old), "r" (new) in __cmpxchg_local_u32() 178 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument 182 return __cmpxchg_u32(ptr, old, new); in __cmpxchg() 185 return __cmpxchg_u64(ptr, old, new); in __cmpxchg() 200 unsigned long new, int size) in __cmpxchg_local() argument 204 return __cmpxchg_local_u32(ptr, old, new); in __cmpxchg_local() 206 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
|
/arch/x86/include/asm/ |
D | cmpxchg.h | 83 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument 87 __typeof__(*(ptr)) __new = (new); \ 131 #define __cmpxchg(ptr, old, new, size) \ argument 132 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX) 134 #define __sync_cmpxchg(ptr, old, new, size) \ argument 135 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ") 137 #define __cmpxchg_local(ptr, old, new, size) \ argument 138 __raw_cmpxchg((ptr), (old), (new), (size), "") 147 #define cmpxchg(ptr, old, new) \ argument 148 __cmpxchg(ptr, old, new, sizeof(*(ptr))) [all …]
|
D | cmpxchg_32.h | 50 static inline u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64() argument 56 : "b" ((u32)new), in __cmpxchg64() 57 "c" ((u32)(new >> 32)), in __cmpxchg64() 63 static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64_local() argument 69 : "b" ((u32)new), in __cmpxchg64_local() 70 "c" ((u32)(new >> 32)), in __cmpxchg64_local() 88 unsigned long new, int size) in cmpxchg_386() argument 92 return cmpxchg_386_u8(ptr, old, new); in cmpxchg_386() 94 return cmpxchg_386_u16(ptr, old, new); in cmpxchg_386() 96 return cmpxchg_386_u32(ptr, old, new); in cmpxchg_386()
|
/arch/frv/include/asm/ |
D | cmpxchg.h | 80 extern uint64_t __cmpxchg_64(uint64_t test, uint64_t new, volatile uint64_t *v); 84 #define cmpxchg(ptr, test, new) \ argument 89 __typeof__(*(ptr)) __xg_new = (new); \ 122 extern uint32_t __cmpxchg_32(uint32_t *v, uint32_t test, uint32_t new); 124 #define cmpxchg(ptr, test, new) \ argument 129 __typeof__(*(ptr)) __xg_new = (new); \ 151 unsigned long new, int size) in __cmpxchg_local() argument 155 return cmpxchg((unsigned long *)ptr, old, new); in __cmpxchg_local() 157 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
|
/arch/sh/drivers/ |
D | heartbeat.c | 38 unsigned int new; in heartbeat_toggle_bit() local 40 new = (1 << hd->bit_pos[bit]); in heartbeat_toggle_bit() 42 new = ~new; in heartbeat_toggle_bit() 44 new &= hd->mask; in heartbeat_toggle_bit() 48 new |= ioread32(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 49 iowrite32(new, hd->base); in heartbeat_toggle_bit() 52 new |= ioread16(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 53 iowrite16(new, hd->base); in heartbeat_toggle_bit() 56 new |= ioread8(hd->base) & ~hd->mask; in heartbeat_toggle_bit() 57 iowrite8(new, hd->base); in heartbeat_toggle_bit()
|
/arch/xtensa/include/asm/ |
D | cmpxchg.h | 23 __cmpxchg_u32(volatile int *p, int old, int new) in __cmpxchg_u32() argument 33 : "a" (p), "a" (old), "r" (new) in __cmpxchg_u32() 43 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument 46 case 4: return __cmpxchg_u32(ptr, old, new); in __cmpxchg() 63 unsigned long new, int size) in __cmpxchg_local() argument 67 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local() 69 return __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
|
/arch/um/drivers/ |
D | xterm.c | 88 int pid, fd, new, err; in xterm_open() local 152 new = xterm_fd(fd, &data->helper_pid); in xterm_open() 153 if (new < 0) { in xterm_open() 154 err = new; in xterm_open() 160 err = os_set_fd_block(new, 0); in xterm_open() 167 CATCH_EINTR(err = tcgetattr(new, &data->tt)); in xterm_open() 169 new = err; in xterm_open() 174 err = raw(new); in xterm_open() 176 new = err; in xterm_open() 185 return new; in xterm_open() [all …]
|
/arch/sh/kernel/ |
D | ftrace.c | 117 int new = old & ~MOD_CODE_WRITE_FLAG; in clear_mod_flag() local 119 if (old == new) in clear_mod_flag() 122 old = atomic_cmpxchg(&nmi_running, old, new); in clear_mod_flag() 244 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local 247 new = ftrace_call_replace(ip, (unsigned long)func); in ftrace_update_ftrace_func() 249 return ftrace_modify_code(ip, old, new); in ftrace_update_ftrace_func() 255 unsigned char *new, *old; in ftrace_make_nop() local 259 new = ftrace_nop_replace(ip); in ftrace_make_nop() 261 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_nop() 266 unsigned char *new, *old; in ftrace_make_call() local [all …]
|
/arch/mips/include/asm/ |
D | cmpxchg.h | 139 #define __cmpxchg_asm(ld, st, m, old, new) \ argument 158 : "R" (*m), "Jr" (old), "Jr" (new) \ 175 : "R" (*m), "Jr" (old), "Jr" (new) \ 183 *m = new; \ 196 #define __cmpxchg(ptr, old, new, pre_barrier, post_barrier) \ argument 200 __typeof__(*(ptr)) __new = (new); \ 225 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_mb__before_llsc(), smp_llsc_mb()) argument 226 #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new, , ) argument
|
/arch/powerpc/kernel/ |
D | proc_powerpc.c | 34 loff_t new; in page_map_seek() local 39 new = off; in page_map_seek() 42 new = file->f_pos + off; in page_map_seek() 45 new = dp->size + off; in page_map_seek() 50 if ( new < 0 || new > dp->size ) in page_map_seek() 52 return (file->f_pos = new); in page_map_seek()
|