Home
last modified time | relevance | path

Searched refs:old (Results 1 – 200 of 1209) sorted by relevance

1234567

/linux-4.1.27/arch/ia64/include/asm/
Dbitops.h41 __u32 bit, old, new; in set_bit() local
49 old = *m; in set_bit()
50 new = old | bit; in set_bit()
51 } while (cmpxchg_acq(m, old, new) != old); in set_bit()
82 __u32 mask, old, new; in clear_bit() local
90 old = *m; in clear_bit()
91 new = old & mask; in clear_bit()
92 } while (cmpxchg_acq(m, old, new) != old); in clear_bit()
106 __u32 mask, old, new; in clear_bit_unlock() local
114 old = *m; in clear_bit_unlock()
[all …]
Drwsem.h55 long old, new; in __down_write() local
58 old = sem->count; in __down_write()
59 new = old + RWSEM_ACTIVE_WRITE_BIAS; in __down_write()
60 } while (cmpxchg_acq(&sem->count, old, new) != old); in __down_write()
62 if (old != 0) in __down_write()
84 long old, new; in __up_write() local
87 old = sem->count; in __up_write()
88 new = old - RWSEM_ACTIVE_WRITE_BIAS; in __up_write()
89 } while (cmpxchg_rel(&sem->count, old, new) != old); in __up_write()
127 long old, new; in __downgrade_write() local
[all …]
Dacenv.h25 unsigned int old, new, val; in ia64_acpi_acquire_global_lock() local
27 old = *lock; in ia64_acpi_acquire_global_lock()
28 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); in ia64_acpi_acquire_global_lock()
29 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_acquire_global_lock()
30 } while (unlikely (val != old)); in ia64_acpi_acquire_global_lock()
37 unsigned int old, new, val; in ia64_acpi_release_global_lock() local
39 old = *lock; in ia64_acpi_release_global_lock()
40 new = old & ~0x3; in ia64_acpi_release_global_lock()
41 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_release_global_lock()
42 } while (unlikely (val != old)); in ia64_acpi_release_global_lock()
[all …]
Datomic.h34 __s32 old, new; \
39 old = atomic_read(v); \
40 new = old c_op i; \
41 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \
78 __s64 old, new; \
83 old = atomic64_read(v); \
84 new = old c_op i; \
85 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); \
118 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) argument
121 #define atomic64_cmpxchg(v, old, new) \ argument
[all …]
Dspinlock.h285 } old, new; in arch_read_trylock() local
286 old.lock = new.lock = *x; in arch_read_trylock()
287 old.lock.write_lock = new.lock.write_lock = 0; in arch_read_trylock()
289 return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; in arch_read_trylock()
/linux-4.1.27/arch/s390/include/asm/
Drwsem.h54 signed long old, new; in __down_read() local
62 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read()
65 if (old < 0) in __down_read()
74 signed long old, new; in __down_read_trylock() local
84 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_read_trylock()
87 return old >= 0 ? 1 : 0; in __down_read_trylock()
95 signed long old, new, tmp; in __down_write_nested() local
104 : "=&d" (old), "=&d" (new), "=Q" (sem->count) in __down_write_nested()
107 if (old != 0) in __down_write_nested()
121 signed long old; in __down_write_trylock() local
[all …]
Dspinlock.h19 _raw_compare_and_swap(unsigned int *lock, unsigned int old, unsigned int new) in _raw_compare_and_swap() argument
21 return __sync_bool_compare_and_swap(lock, old, new); in _raw_compare_and_swap()
134 unsigned int old = ACCESS_ONCE(rw->lock); in arch_read_trylock_once() local
135 return likely((int) old >= 0 && in arch_read_trylock_once()
136 _raw_compare_and_swap(&rw->lock, old, old + 1)); in arch_read_trylock_once()
141 unsigned int old = ACCESS_ONCE(rw->lock); in arch_write_trylock_once() local
142 return likely(old == 0 && in arch_write_trylock_once()
185 unsigned int old; in arch_read_lock() local
187 old = __RAW_LOCK(&rw->lock, 1, __RAW_OP_ADD); in arch_read_lock()
188 if ((int) old < 0) in arch_read_lock()
[all …]
Datomic.h133 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
137 : "+d" (old), "+Q" (v->counter) in atomic_cmpxchg()
140 return old; in atomic_cmpxchg()
145 int c, old; in __atomic_add_unless() local
150 old = atomic_cmpxchg(v, c, c + a); in __atomic_add_unless()
151 if (likely(old == c)) in __atomic_add_unless()
153 c = old; in __atomic_add_unless()
263 long long old, long long new) in atomic64_cmpxchg() argument
267 : "+d" (old), "+Q" (v->counter) in atomic64_cmpxchg()
270 return old; in atomic64_cmpxchg()
[all …]
Dbitops.h186 unsigned long old, mask; in test_and_set_bit() local
189 old = __BITOPS_LOOP(addr, mask, __BITOPS_OR, __BITOPS_BARRIER); in test_and_set_bit()
190 return (old & mask) != 0; in test_and_set_bit()
197 unsigned long old, mask; in test_and_clear_bit() local
200 old = __BITOPS_LOOP(addr, mask, __BITOPS_AND, __BITOPS_BARRIER); in test_and_clear_bit()
201 return (old & ~mask) != 0; in test_and_clear_bit()
208 unsigned long old, mask; in test_and_change_bit() local
211 old = __BITOPS_LOOP(addr, mask, __BITOPS_XOR, __BITOPS_BARRIER); in test_and_change_bit()
212 return (old & mask) != 0; in test_and_change_bit()
Dtimex.h56 unsigned long long old; in local_tick_disable() local
58 old = S390_lowcore.clock_comparator; in local_tick_disable()
61 return old; in local_tick_disable()
/linux-4.1.27/arch/s390/lib/
Dspinlock.c35 static inline void _raw_compare_and_delay(unsigned int *lock, unsigned int old) in _raw_compare_and_delay() argument
37 asm(".insn rsy,0xeb0000000022,%0,0,%1" : : "d" (old), "Q" (*lock)); in _raw_compare_and_delay()
139 unsigned int owner, old; in _raw_read_lock_wait() local
152 old = ACCESS_ONCE(rw->lock); in _raw_read_lock_wait()
154 if ((int) old < 0) { in _raw_read_lock_wait()
156 _raw_compare_and_delay(&rw->lock, old); in _raw_read_lock_wait()
159 if (_raw_compare_and_swap(&rw->lock, old, old + 1)) in _raw_read_lock_wait()
167 unsigned int old; in _raw_read_trylock_retry() local
171 old = ACCESS_ONCE(rw->lock); in _raw_read_trylock_retry()
172 if ((int) old < 0) { in _raw_read_trylock_retry()
[all …]
/linux-4.1.27/arch/sparc/kernel/
Dftrace.c25 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
60 old = ftrace_call_replace(ip, addr); 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
70 old = ftrace_nop; 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 …]
/linux-4.1.27/arch/avr32/include/asm/
Dcmpxchg.h46 static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, 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);
75 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
80 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
82 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
86 return old; in __cmpxchg()
89 #define cmpxchg(ptr, old, new) \ argument
90 ((typeof(*(ptr)))__cmpxchg((ptr), (unsigned long)(old), \
97 unsigned long old, in __cmpxchg_local() argument
[all …]
Dbitops.h135 unsigned long tmp, old; in test_and_set_bit() local
145 : "=&r"(tmp), "=o"(*p), "=&r"(old) in test_and_set_bit()
155 : "=&r"(tmp), "=o"(*p), "=&r"(old) in test_and_set_bit()
160 return (old & mask) != 0; in test_and_set_bit()
175 unsigned long tmp, old; in test_and_clear_bit() local
185 : "=&r"(tmp), "=o"(*p), "=&r"(old) in test_and_clear_bit()
196 : "=&r"(tmp), "=o"(*p), "=&r"(old) in test_and_clear_bit()
201 return (old & mask) != 0; in test_and_clear_bit()
216 unsigned long tmp, old; in test_and_change_bit() local
224 : "=&r"(tmp), "=o"(*p), "=&r"(old) in test_and_change_bit()
[all …]
/linux-4.1.27/drivers/gpu/drm/
Ddrm_lock.c189 unsigned int old, new, prev; in drm_lock_take() local
194 old = *lock; in drm_lock_take()
195 if (old & _DRM_LOCK_HELD) in drm_lock_take()
196 new = old | _DRM_LOCK_CONT; in drm_lock_take()
202 prev = cmpxchg(lock, old, new); in drm_lock_take()
203 } while (prev != old); in drm_lock_take()
206 if (_DRM_LOCKING_CONTEXT(old) == context) { in drm_lock_take()
207 if (old & _DRM_LOCK_HELD) { in drm_lock_take()
238 unsigned int old, new, prev; in drm_lock_transfer() local
243 old = *lock; in drm_lock_transfer()
[all …]
/linux-4.1.27/arch/metag/include/asm/
Dbitops.h54 unsigned long old; in test_and_set_bit() local
60 old = *p; in test_and_set_bit()
61 if (!(old & mask)) { in test_and_set_bit()
63 *p = old | mask; in test_and_set_bit()
67 return (old & mask) != 0; in test_and_set_bit()
74 unsigned long old; in test_and_clear_bit() local
80 old = *p; in test_and_clear_bit()
81 if (old & mask) { in test_and_clear_bit()
83 *p = old & ~mask; in test_and_clear_bit()
87 return (old & mask) != 0; in test_and_clear_bit()
[all …]
Dcmpxchg_lnkget.h6 int temp, old; in xchg_u32() local
20 : "=&d" (temp), "=&d" (old) in xchg_u32()
27 return old; in xchg_u32()
32 int temp, old; in xchg_u8() local
46 : "=&d" (temp), "=&d" (old) in xchg_u8()
53 return old; in xchg_u8()
56 static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, in __cmpxchg_u32() argument
77 : "da" (m), "bd" (old), "da" (new) in __cmpxchg_u32()
Datomic_lnkget.h115 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
132 : "da" (&v->counter), "bd" (old), "da" (new) in atomic_cmpxchg()
142 int temp, old; in atomic_xchg() local
151 : "=&d" (temp), "=&d" (old) in atomic_xchg()
155 return old; in atomic_xchg()
Dcmpxchg.h43 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
48 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
51 return old; in __cmpxchg()
/linux-4.1.27/arch/arm/kernel/
Dftrace.c102 static int ftrace_modify_code(unsigned long pc, unsigned long old, in ftrace_modify_code() argument
108 old = __opcode_to_mem_thumb32(old); in ftrace_modify_code()
111 old = __opcode_to_mem_arm(old); in ftrace_modify_code()
119 if (replaced != old) in ftrace_modify_code()
156 unsigned long new, old; in ftrace_make_call() local
159 old = ftrace_nop_replace(rec); in ftrace_make_call()
162 return ftrace_modify_code(rec->ip, old, new, true); in ftrace_make_call()
169 unsigned long old; in ftrace_make_nop() local
173 old = ftrace_call_replace(ip, adjust_address(rec, addr)); in ftrace_make_nop()
175 ret = ftrace_modify_code(ip, old, new, true); in ftrace_make_nop()
[all …]
/linux-4.1.27/drivers/input/joystick/iforce/
Diforce-ff.c201 struct ff_effect *old, in need_condition_modifier() argument
214 ret |= old->u.condition[i].right_saturation != new->u.condition[i].right_saturation in need_condition_modifier()
215 || old->u.condition[i].left_saturation != new->u.condition[i].left_saturation in need_condition_modifier()
216 || old->u.condition[i].right_coeff != new->u.condition[i].right_coeff in need_condition_modifier()
217 || old->u.condition[i].left_coeff != new->u.condition[i].left_coeff in need_condition_modifier()
218 || old->u.condition[i].deadband != new->u.condition[i].deadband in need_condition_modifier()
219 || old->u.condition[i].center != new->u.condition[i].center; in need_condition_modifier()
229 struct ff_effect *old, in need_magnitude_modifier() argument
238 return old->u.constant.level != effect->u.constant.level; in need_magnitude_modifier()
245 static int need_envelope_modifier(struct iforce *iforce, struct ff_effect *old, in need_envelope_modifier() argument
[all …]
/linux-4.1.27/kernel/
Dtracepoint.c74 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
76 if (old) { in release_probes()
77 struct tp_probes *tp_probes = container_of(old, in release_probes()
98 struct tracepoint_func *old, *new; in func_add() local
104 old = *funcs; in func_add()
105 if (old) { in func_add()
107 for (nr_probes = 0; old[nr_probes].func; nr_probes++) in func_add()
108 if (old[nr_probes].func == tp_func->func && in func_add()
109 old[nr_probes].data == tp_func->data) in func_add()
116 if (old) in func_add()
[all …]
Dcred.c241 const struct cred *old; in prepare_creds() local
252 old = task->cred; in prepare_creds()
253 memcpy(new, old, sizeof(struct cred)); in prepare_creds()
272 if (security_prepare_creds(new, old, GFP_KERNEL) < 0) in prepare_creds()
420 const struct cred *old = task->real_cred; in commit_creds() local
426 BUG_ON(task->cred != old); in commit_creds()
428 BUG_ON(read_cred_subscribers(old) < 2); in commit_creds()
429 validate_creds(old); in commit_creds()
437 if (!uid_eq(old->euid, new->euid) || in commit_creds()
438 !gid_eq(old->egid, new->egid) || in commit_creds()
[all …]
Dsys.c332 const struct cred *old; in SYSCALL_DEFINE2() local
348 old = current_cred(); in SYSCALL_DEFINE2()
352 if (gid_eq(old->gid, krgid) || in SYSCALL_DEFINE2()
353 gid_eq(old->egid, krgid) || in SYSCALL_DEFINE2()
354 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2()
360 if (gid_eq(old->gid, kegid) || in SYSCALL_DEFINE2()
361 gid_eq(old->egid, kegid) || in SYSCALL_DEFINE2()
362 gid_eq(old->sgid, kegid) || in SYSCALL_DEFINE2()
363 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2()
370 (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) in SYSCALL_DEFINE2()
[all …]
Dwatchdog.c774 int err, old, new; in proc_watchdog_common() local
800 old = watchdog_enabled; in proc_watchdog_common()
806 new = old | which; in proc_watchdog_common()
808 new = old & ~which; in proc_watchdog_common()
809 } while (cmpxchg(&watchdog_enabled, old, new) != old); in proc_watchdog_common()
815 if (old == new) in proc_watchdog_common()
820 watchdog_enabled = old; in proc_watchdog_common()
863 int err, old, new; in proc_watchdog_thresh() local
867 old = ACCESS_ONCE(watchdog_thresh); in proc_watchdog_thresh()
878 if (old == new) in proc_watchdog_thresh()
[all …]
Dresource.c236 static int __release_resource(struct resource *old) in __release_resource() argument
240 p = &old->parent->child; in __release_resource()
245 if (tmp == old) { in __release_resource()
247 old->parent = NULL; in __release_resource()
323 int release_resource(struct resource *old) in release_resource() argument
328 retval = __release_resource(old); in release_resource()
556 static int __find_resource(struct resource *root, struct resource *old, in __find_resource() argument
570 tmp.start = (this == old) ? old->start : this->end + 1; in __find_resource()
575 tmp.end = (this == old) ? this->end : this->start - 1; in __find_resource()
604 if (this != old) in __find_resource()
[all …]
Dexec_domain.c52 unsigned int old = current->personality; in SYSCALL_DEFINE1() local
57 return old; in SYSCALL_DEFINE1()
/linux-4.1.27/arch/sh/kernel/
Dftrace.c114 int old = atomic_read(&nmi_running); in clear_mod_flag() local
117 int new = old & ~MOD_CODE_WRITE_FLAG; in clear_mod_flag()
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
246 memcpy(old, (unsigned char *)ip, MCOUNT_INSN_SIZE); 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
258 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
261 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_nop()
[all …]
/linux-4.1.27/lib/
Dlockref.c19 struct lockref old; \
20 BUILD_BUG_ON(sizeof(old) != 8); \
21 old.lock_count = READ_ONCE(lockref->lock_count); \
22 while (likely(arch_spin_value_unlocked(old.lock.rlock.raw_lock))) { \
23 struct lockref new = old, prev = old; \
25 old.lock_count = cmpxchg64_relaxed(&lockref->lock_count, \
26 old.lock_count, \
28 if (likely(old.lock_count == prev.lock_count)) { \
73 if (old.count <= 0) in lockref_get_not_zero()
100 if (old.count <= 0) in lockref_get_or_lock()
[all …]
Ddump_stack.c30 int old; in dump_stack() local
40 old = atomic_cmpxchg(&dump_lock, -1, cpu); in dump_stack()
41 if (old == -1) { in dump_stack()
43 } else if (old == cpu) { in dump_stack()
Drbtree.c63 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
66 struct rb_node *parent = rb_parent(old); in __rb_rotate_set_parents()
67 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
68 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
69 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
74 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() argument
203 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
365 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
379 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy() argument
380 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate() argument
[all …]
/linux-4.1.27/arch/tile/kernel/
Dftrace.c110 static int ftrace_modify_code(unsigned long pc, unsigned long old, in ftrace_modify_code() argument
135 unsigned long pc, old; in ftrace_update_ftrace_func() local
140 memcpy(&old, &ftrace_call, MCOUNT_INSN_SIZE); in ftrace_update_ftrace_func()
143 ret = ftrace_modify_code(pc, old, new); in ftrace_update_ftrace_func()
150 unsigned long new, old; in ftrace_make_call() local
153 old = ftrace_nop_replace(rec); in ftrace_make_call()
156 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_call()
163 unsigned long old; in ftrace_make_nop() local
167 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
169 ret = ftrace_modify_code(ip, old, new); in ftrace_make_nop()
[all …]
/linux-4.1.27/arch/arm64/kernel/
Dftrace.c25 static int ftrace_modify_code(unsigned long pc, u32 old, u32 new, in ftrace_modify_code() argument
43 if (replaced != old) in ftrace_modify_code()
73 u32 old, new; in ftrace_make_call() local
75 old = aarch64_insn_gen_nop(); in ftrace_make_call()
78 return ftrace_modify_code(pc, old, new, true); in ftrace_make_call()
88 u32 old, new; in ftrace_make_nop() local
90 old = aarch64_insn_gen_branch_imm(pc, addr, AARCH64_INSN_BRANCH_LINK); in ftrace_make_nop()
93 return ftrace_modify_code(pc, old, new, true); in ftrace_make_nop()
115 unsigned long old; in prepare_ftrace_return() local
127 old = *parent; in prepare_ftrace_return()
[all …]
/linux-4.1.27/arch/xtensa/include/asm/
Dcmpxchg.h23 __cmpxchg_u32(volatile int *p, int old, int new) in __cmpxchg_u32() argument
30 : "a" (p), "a" (old) in __cmpxchg_u32()
44 : "=&a" (old) in __cmpxchg_u32()
45 : "a" (p), "a" (old), "r" (new) in __cmpxchg_u32()
47 return old; in __cmpxchg_u32()
56 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
59 case 4: return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
61 return old; in __cmpxchg()
75 unsigned long old, in __cmpxchg_local() argument
80 return __cmpxchg_u32(ptr, old, new); in __cmpxchg_local()
[all …]
Datomic.h240 int c, old; in ATOMIC_OPS() local
245 old = atomic_cmpxchg((v), c, c + (a)); in ATOMIC_OPS()
246 if (likely(old == c)) in ATOMIC_OPS()
248 c = old; in ATOMIC_OPS()
/linux-4.1.27/arch/sparc/lib/
Datomic32.c61 int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
68 if (likely(ret == old)) in atomic_cmpxchg()
103 unsigned long old, flags; in ___set_bit() local
106 old = *addr; in ___set_bit()
107 *addr = old | mask; in ___set_bit()
110 return old & mask; in ___set_bit()
116 unsigned long old, flags; in ___clear_bit() local
119 old = *addr; in ___clear_bit()
120 *addr = old & ~mask; in ___clear_bit()
123 return old & mask; in ___clear_bit()
[all …]
/linux-4.1.27/arch/alpha/include/asm/
Dxchg.h137 ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg() argument
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
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()
241 ____cmpxchg(, volatile void *ptr, unsigned long old, unsigned long new,
246 return ____cmpxchg(_u8, ptr, old, new);
[all …]
Datomic.h119 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
122 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument
136 int c, new, old; in ATOMIC_OPS() local
149 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS()
153 return old; in ATOMIC_OPS()
197 long old, tmp; in atomic64_dec_if_positive() local
209 : [old] "=&r"(old), [tmp] "=&r"(tmp) in atomic64_dec_if_positive()
213 return old - 1; in atomic64_dec_if_positive()
Dbitops.h193 int old = *m; in __test_and_set_bit() local
195 *m = old | mask; in __test_and_set_bit()
196 return (old & mask) != 0; in __test_and_set_bit()
237 int old = *m; in __test_and_clear_bit() local
239 *m = old & ~mask; in __test_and_clear_bit()
240 return (old & mask) != 0; in __test_and_clear_bit()
279 int old = *m; in __test_and_change_bit() local
281 *m = old ^ mask; in __test_and_change_bit()
282 return (old & mask) != 0; in __test_and_change_bit()
Dlocal.h69 long c, old; \
74 old = local_cmpxchg((l), c, c + (a)); \
75 if (likely(old == c)) \
77 c = old; \
Drwsem.h53 long old, new, res; in __down_read_trylock() local
60 old = res; in __down_read_trylock()
61 res = cmpxchg(&sem->count, old, new); in __down_read_trylock()
62 } while (res != old); in __down_read_trylock()
/linux-4.1.27/arch/sparc/include/asm/
Dcmpxchg_64.h71 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument
75 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32()
82 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
86 : "0" (new), "r" (m), "r" (old) 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()
103 return __cmpxchg_u64(ptr, old, new); in __cmpxchg()
106 return old; in __cmpxchg()
123 unsigned long old, in __cmpxchg_local() argument
128 case 8: return __cmpxchg(ptr, old, new, size); in __cmpxchg_local()
[all …]
Datomic_64.h77 int c, old; in ATOMIC_OPS() local
82 old = atomic_cmpxchg((v), c, c + (a)); in ATOMIC_OPS()
83 if (likely(old == c)) in ATOMIC_OPS()
85 c = old; in ATOMIC_OPS()
96 long c, old; in atomic64_add_unless() local
101 old = atomic64_cmpxchg((v), c, c + (a)); in atomic64_add_unless()
102 if (likely(old == c)) in atomic64_add_unless()
104 c = old; in atomic64_add_unless()
Dcmpxchg_32.h42 unsigned long __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_);
46 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) in __cmpxchg() argument
50 return __cmpxchg_u32((u32 *)ptr, (u32)old, (u32)new_); in __cmpxchg()
55 return old; in __cmpxchg()
/linux-4.1.27/drivers/dma-buf/
Dreservation.c52 struct reservation_object_list *fobj, *old; in reservation_object_reserve_shared() local
55 old = reservation_object_get_list(obj); in reservation_object_reserve_shared()
57 if (old && old->shared_max) { in reservation_object_reserve_shared()
58 if (old->shared_count < old->shared_max) { in reservation_object_reserve_shared()
64 max = old->shared_max * 2; in reservation_object_reserve_shared()
125 struct reservation_object_list *old, in reservation_object_add_shared_replace() argument
134 if (!old) { in reservation_object_add_shared_replace()
146 fobj->shared_count = old->shared_count; in reservation_object_add_shared_replace()
148 for (i = 0; i < old->shared_count; ++i) { in reservation_object_add_shared_replace()
151 check = rcu_dereference_protected(old->shared[i], in reservation_object_add_shared_replace()
[all …]
/linux-4.1.27/arch/powerpc/include/asm/
Dcmpxchg.h150 __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()
173 __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, 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()
218 __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, 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 …]
Dpgtable-ppc32.h171 unsigned long old, tmp; in pte_update() local
187 : "=&r" (old), "=&r" (tmp), "=m" (*p), "=&r" (tmp2) in pte_update()
198 : "=&r" (old), "=&r" (tmp), "=m" (*p) in pte_update()
203 unsigned long old = pte_val(*p); in pte_update()
204 *p = __pte((old & ~clr) | set); in pte_update()
208 if ((old & _PAGE_USER) && (old & _PAGE_EXEC)) in pte_update()
211 return old; in pte_update()
219 unsigned long long old; in pte_update() local
230 : "=&r" (old), "=&r" (tmp), "=m" (*p) in pte_update()
234 unsigned long long old = pte_val(*p); in pte_update()
[all …]
Dpgtable-ppc64.h226 unsigned long old, tmp; in pte_update() local
236 : "=&r" (old), "=&r" (tmp), "=m" (*ptep) in pte_update()
240 unsigned long old = pte_val(*ptep); in pte_update()
241 *ptep = __pte((old & ~clr) | set); in pte_update()
248 if (old & _PAGE_HASHPTE) in pte_update()
249 hpte_need_flush(mm, addr, ptep, old, huge); in pte_update()
252 return old; in pte_update()
258 unsigned long old; in __ptep_test_and_clear_young() local
262 old = pte_update(mm, addr, ptep, _PAGE_ACCESSED, 0, 0); in __ptep_test_and_clear_young()
263 return (old & _PAGE_ACCESSED) != 0; in __ptep_test_and_clear_young()
[all …]
Dbitops.h61 unsigned long old; \
70 : "=&r" (old), "+m" (*p) \
107 unsigned long old, t; \
117 : "=&r" (old), "=&r" (t) \
120 return (old & mask); \
/linux-4.1.27/include/asm-generic/bitops/
Datomic.h131 unsigned long old; in test_and_set_bit() local
135 old = *p; in test_and_set_bit()
136 *p = old | mask; in test_and_set_bit()
139 return (old & mask) != 0; in test_and_set_bit()
155 unsigned long old; in test_and_clear_bit() local
159 old = *p; in test_and_clear_bit()
160 *p = old & ~mask; in test_and_clear_bit()
163 return (old & mask) != 0; in test_and_clear_bit()
178 unsigned long old; in test_and_change_bit() local
182 old = *p; in test_and_change_bit()
[all …]
Dnon-atomic.h61 unsigned long old = *p; in __test_and_set_bit() local
63 *p = old | mask; in __test_and_set_bit()
64 return (old & mask) != 0; in __test_and_set_bit()
80 unsigned long old = *p; in __test_and_clear_bit() local
82 *p = old & ~mask; in __test_and_clear_bit()
83 return (old & mask) != 0; in __test_and_clear_bit()
92 unsigned long old = *p; in __test_and_change_bit() local
94 *p = old ^ mask; in __test_and_change_bit()
95 return (old & mask) != 0; in __test_and_change_bit()
/linux-4.1.27/arch/m32r/include/asm/
Dcmpxchg.h113 __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()
143 __cmpxchg_local_u32(volatile unsigned int *p, unsigned int old, 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()
189 return old; in __cmpxchg()
199 unsigned long old, in __cmpxchg_local() argument
204 return __cmpxchg_local_u32(ptr, old, new); in __cmpxchg_local()
[all …]
Datomic.h229 int c, old; in __atomic_add_unless() local
234 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
235 if (likely(old == c)) in __atomic_add_unless()
237 c = old; in __atomic_add_unless()
Dlocal.h260 long c, old; in local_add_unless() local
265 old = local_cmpxchg((l), c, c + (a)); in local_add_unless()
266 if (likely(old == c)) in local_add_unless()
268 c = old; in local_add_unless()
/linux-4.1.27/arch/parisc/include/asm/
Dcmpxchg.h55 extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old,
58 unsigned long old, unsigned long new_);
62 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) in __cmpxchg() argument
66 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); in __cmpxchg()
69 (unsigned int)old, (unsigned int)new_); in __cmpxchg()
72 return old; in __cmpxchg()
86 unsigned long old, in __cmpxchg_local() argument
91 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); in __cmpxchg_local()
93 case 4: return __cmpxchg_u32(ptr, old, new_); in __cmpxchg_local()
95 return __cmpxchg_local_generic(ptr, old, new_, size); in __cmpxchg_local()
Dbitops.h65 unsigned long old; in test_and_set_bit() local
71 old = *addr; in test_and_set_bit()
72 set = (old & mask) ? 1 : 0; in test_and_set_bit()
74 *addr = old | mask; in test_and_set_bit()
83 unsigned long old; in test_and_clear_bit() local
89 old = *addr; in test_and_clear_bit()
90 set = (old & mask) ? 1 : 0; in test_and_clear_bit()
92 *addr = old & ~mask; in test_and_clear_bit()
Datomic.h88 int c, old; in __atomic_add_unless() local
93 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
94 if (likely(old == c)) in __atomic_add_unless()
96 c = old; in __atomic_add_unless()
238 long c, old; in atomic64_add_unless() local
243 old = atomic64_cmpxchg((v), c, c + (a)); in atomic64_add_unless()
244 if (likely(old == c)) in atomic64_add_unless()
246 c = old; in atomic64_add_unless()
262 long c, old, dec; in atomic64_dec_if_positive() local
268 old = atomic64_cmpxchg((v), c, dec); in atomic64_dec_if_positive()
[all …]
/linux-4.1.27/arch/s390/kernel/
Dftrace.c107 struct ftrace_insn orig, new, old; in ftrace_make_nop() local
109 if (probe_kernel_read(&old, (void *) rec->ip, sizeof(old))) in ftrace_make_nop()
115 } else if (is_kprobe_on_ftrace(&old)) { in ftrace_make_nop()
131 if (memcmp(&orig, &old, sizeof(old))) in ftrace_make_nop()
139 struct ftrace_insn orig, new, old; in ftrace_make_call() local
141 if (probe_kernel_read(&old, (void *) rec->ip, sizeof(old))) in ftrace_make_call()
143 if (is_kprobe_on_ftrace(&old)) { in ftrace_make_call()
159 if (memcmp(&orig, &old, sizeof(old))) in ftrace_make_call()
Djump_label.c65 struct insn old, new; in __jump_label_transform() local
68 jump_label_make_nop(entry, &old); in __jump_label_transform()
71 jump_label_make_branch(entry, &old); in __jump_label_transform()
78 if (memcmp((void *)entry->code, &old, sizeof(old))) in __jump_label_transform()
79 jump_label_bug(entry, &old, &new); in __jump_label_transform()
/linux-4.1.27/drivers/hid/usbhid/
Dhid-pidff.c274 struct ff_envelope *old) in pidff_needs_set_envelope() argument
276 return envelope->attack_level != old->attack_level || in pidff_needs_set_envelope()
277 envelope->fade_level != old->fade_level || in pidff_needs_set_envelope()
278 envelope->attack_length != old->attack_length || in pidff_needs_set_envelope()
279 envelope->fade_length != old->fade_length; in pidff_needs_set_envelope()
301 struct ff_effect *old) in pidff_needs_set_constant() argument
303 return effect->u.constant.level != old->u.constant.level; in pidff_needs_set_constant()
336 struct ff_effect *old) in pidff_needs_set_effect() argument
338 return effect->replay.length != old->replay.length || in pidff_needs_set_effect()
339 effect->trigger.interval != old->trigger.interval || in pidff_needs_set_effect()
[all …]
Dusbkbd.c96 unsigned char old[8]; member
135 if (kbd->old[i] > 3 && memscan(kbd->new + 2, kbd->old[i], 6) == kbd->new + 8) { in usb_kbd_irq()
136 if (usb_kbd_keycode[kbd->old[i]]) in usb_kbd_irq()
137 input_report_key(kbd->dev, usb_kbd_keycode[kbd->old[i]], 0); in usb_kbd_irq()
141 kbd->old[i]); in usb_kbd_irq()
144 if (kbd->new[i] > 3 && memscan(kbd->old + 2, kbd->new[i], 6) == kbd->old + 8) { in usb_kbd_irq()
156 memcpy(kbd->old, kbd->new, 8); in usb_kbd_irq()
/linux-4.1.27/arch/arm/include/asm/
Dcmpxchg.h138 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
155 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
167 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
180 : "r" (ptr), "Ir" (old), "r" (new) in __cmpxchg()
192 static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, in __cmpxchg_mb() argument
198 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
211 unsigned long old, in __cmpxchg_local() argument
220 ret = __cmpxchg_local_generic(ptr, old, new, size); in __cmpxchg_local()
224 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_local()
231 unsigned long long old, in __cmpxchg64() argument
[all …]
Datomic.h83 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) in atomic_cmpxchg() argument
98 : "r" (&ptr->counter), "Ir" (old), "r" (new) in atomic_cmpxchg()
164 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
171 if (likely(ret == old)) in atomic_cmpxchg()
180 int c, old; in __atomic_add_unless() local
183 while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c) in __atomic_add_unless()
184 c = old; in __atomic_add_unless()
328 static inline long long atomic64_cmpxchg(atomic64_t *ptr, long long old, in ATOMIC64_OPS()
345 : "r" (&ptr->counter), "r" (old), "r" (new) in ATOMIC64_OPS()
/linux-4.1.27/include/linux/
Datomic.h99 int c, old, dec; in atomic_dec_if_positive() local
105 old = atomic_cmpxchg((v), c, dec); in atomic_dec_if_positive()
106 if (likely(old == c)) in atomic_dec_if_positive()
108 c = old; in atomic_dec_if_positive()
117 int old; in atomic_or() local
121 old = atomic_read(v); in atomic_or()
122 new = old | i; in atomic_or()
123 } while (atomic_cmpxchg(v, old, new) != old); in atomic_or()
Drbtree_augmented.h40 void (*copy)(struct rb_node *old, struct rb_node *new);
41 void (*rotate)(struct rb_node *old, struct rb_node *new);
45 void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
80 rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
82 new->rbaugmented = old->rbaugmented; \
87 rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
89 new->rbaugmented = old->rbaugmented; \
90 old->rbaugmented = rbcompute(old); \
121 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument
125 if (parent->rb_left == old) in __rb_change_child()
[all …]
Dvia-core.h219 u8 old; in via_write_reg_mask() local
222 old = inb(port + 1); in via_write_reg_mask()
223 outb((data & mask) | (old & ~mask), port + 1); in via_write_reg_mask()
231 u8 old = inb(VIA_MISC_REG_READ); in via_write_misc_reg_mask() local
232 outb((data & mask) | (old & ~mask), VIA_MISC_REG_WRITE); in via_write_misc_reg_mask()
Drculist.h171 static inline void list_replace_rcu(struct list_head *old, in list_replace_rcu() argument
174 new->next = old->next; in list_replace_rcu()
175 new->prev = old->prev; in list_replace_rcu()
178 old->prev = LIST_POISON2; in list_replace_rcu()
356 static inline void hlist_replace_rcu(struct hlist_node *old, in hlist_replace_rcu() argument
359 struct hlist_node *next = old->next; in hlist_replace_rcu()
362 new->pprev = old->pprev; in hlist_replace_rcu()
366 old->pprev = LIST_POISON2; in hlist_replace_rcu()
Dbitops.h206 typeof(*ptr) old, new; \
209 old = ACCESS_ONCE(*ptr); \
210 new = (old & ~mask) | bits; \
211 } while (cmpxchg(ptr, old, new) != old); \
Dserial_8250.h37 struct ktermios *old);
40 unsigned old);
141 struct ktermios *termios, struct ktermios *old);
/linux-4.1.27/arch/metag/kernel/
Dftrace.c86 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local
89 memcpy(old, &ftrace_call, MCOUNT_INSN_SIZE); in ftrace_update_ftrace_func()
91 ret = ftrace_modify_code(pc, old, new); in ftrace_update_ftrace_func()
99 unsigned char *new, *old; in ftrace_make_nop() local
102 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
105 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
110 unsigned char *new, *old; in ftrace_make_call() local
113 old = ftrace_nop_replace(); in ftrace_make_call()
116 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
/linux-4.1.27/security/
Dcommoncap.c251 const struct cred *old, in cap_capset() argument
258 cap_combine(old->cap_inheritable, in cap_capset()
259 old->cap_permitted))) in cap_capset()
264 cap_combine(old->cap_inheritable, in cap_capset()
265 old->cap_bset))) in cap_capset()
270 if (!cap_issubset(*permitted, old->cap_permitted)) in cap_capset()
485 const struct cred *old = current_cred(); in cap_bprm_set_creds() local
517 new->cap_permitted = cap_combine(old->cap_bset, in cap_bprm_set_creds()
518 old->cap_inheritable); in cap_bprm_set_creds()
526 if (!cap_issubset(new->cap_permitted, old->cap_permitted)) in cap_bprm_set_creds()
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/libcfs/linux/
Dlinux-prim.c132 sigset_t old; in cfs_block_allsigs() local
135 old = current->blocked; in cfs_block_allsigs()
140 return old; in cfs_block_allsigs()
147 sigset_t old; in cfs_block_sigs() local
150 old = current->blocked; in cfs_block_sigs()
154 return old; in cfs_block_sigs()
162 sigset_t old; in cfs_block_sigsinv() local
165 old = current->blocked; in cfs_block_sigsinv()
170 return old; in cfs_block_sigsinv()
175 cfs_restore_sigs(sigset_t old) in cfs_restore_sigs() argument
[all …]
/linux-4.1.27/arch/x86/include/asm/
Dcmpxchg.h85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
88 __typeof__(*(ptr)) __old = (old); \
133 #define __cmpxchg(ptr, old, new, size) \ argument
134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
136 #define __sync_cmpxchg(ptr, old, new, size) \ argument
137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
139 #define __cmpxchg_local(ptr, old, new, size) \ argument
140 __raw_cmpxchg((ptr), (old), (new), (size), "")
148 #define cmpxchg(ptr, old, new) \ argument
149 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
[all …]
Datomic64_64.h164 static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new) in atomic64_cmpxchg() argument
166 return cmpxchg(&v->counter, old, new); in atomic64_cmpxchg()
185 long c, old; in atomic64_add_unless() local
190 old = atomic64_cmpxchg((v), c, c + (a)); in atomic64_add_unless()
191 if (likely(old == c)) in atomic64_add_unless()
193 c = old; in atomic64_add_unless()
209 long c, old, dec; in atomic64_dec_if_positive() local
215 old = atomic64_cmpxchg((v), c, dec); in atomic64_dec_if_positive()
216 if (likely(old == c)) in atomic64_dec_if_positive()
218 c = old; in atomic64_dec_if_positive()
Dspinlock.h72 arch_spinlock_t old, new; in __ticket_check_and_clear_slowpath() local
74 old.tickets.head = head; in __ticket_check_and_clear_slowpath()
76 old.tickets.tail = new.tickets.head + TICKET_LOCK_INC; in __ticket_check_and_clear_slowpath()
77 new.tickets.tail = old.tickets.tail; in __ticket_check_and_clear_slowpath()
80 cmpxchg(&lock->head_tail, old.head_tail, new.head_tail); in __ticket_check_and_clear_slowpath()
129 arch_spinlock_t old, new; in arch_spin_trylock() local
131 old.tickets = READ_ONCE(lock->tickets); in arch_spin_trylock()
132 if (!__tickets_equal(old.tickets.head, old.tickets.tail)) in arch_spin_trylock()
135 new.head_tail = old.head_tail + (TICKET_LOCK_INC << TICKET_SHIFT); in arch_spin_trylock()
139 return cmpxchg(&lock->head_tail, old.head_tail, new.head_tail) == old.head_tail; in arch_spin_trylock()
Datomic.h175 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
177 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg()
196 int c, old; in __atomic_add_unless() local
201 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
202 if (likely(old == c)) in __atomic_add_unless()
204 c = old; in __atomic_add_unless()
Dcmpxchg_32.h46 static inline u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64() argument
54 "0" (old) in __cmpxchg64()
59 static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) in __cmpxchg64_local() argument
67 "0" (old) in __cmpxchg64_local()
Dlocal.h138 long c, old; \
143 old = local_cmpxchg((l), c, c + (a)); \
144 if (likely(old == c)) \
146 c = old; \
Dfpu-internal.h435 static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct task_struct *new, int… in switch_fpu_prepare() argument
446 if (__thread_has_fpu(old)) { in switch_fpu_prepare()
447 if (!__save_init_fpu(old)) in switch_fpu_prepare()
448 task_disable_lazy_fpu_restore(old); in switch_fpu_prepare()
450 old->thread.fpu.last_cpu = cpu; in switch_fpu_prepare()
453 old->thread.fpu.has_fpu = 0; in switch_fpu_prepare()
463 old->thread.fpu_counter = 0; in switch_fpu_prepare()
464 task_disable_lazy_fpu_restore(old); in switch_fpu_prepare()
/linux-4.1.27/net/core/
Dnetprio_cgroup.c39 struct netprio_map *old, *new; in extend_netdev_table() local
43 old = rtnl_dereference(dev->priomap); in extend_netdev_table()
44 if (old && old->priomap_len > target_idx) in extend_netdev_table()
69 if (old) in extend_netdev_table()
70 memcpy(new->priomap, old->priomap, in extend_netdev_table()
71 old->priomap_len * sizeof(old->priomap[0])); in extend_netdev_table()
77 if (old) in extend_netdev_table()
78 kfree_rcu(old, rcu); in extend_netdev_table()
259 struct netprio_map *old; in netprio_device_event() local
268 old = rtnl_dereference(dev->priomap); in netprio_device_event()
[all …]
Ddst.c295 u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old) in dst_cow_metrics_generic() argument
300 u32 *old_p = __DST_METRICS_PTR(old); in dst_cow_metrics_generic()
306 prev = cmpxchg(&dst->_metrics, old, new); in dst_cow_metrics_generic()
308 if (prev != old) { in dst_cow_metrics_generic()
320 void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old) in __dst_destroy_metrics_generic() argument
325 prev = cmpxchg(&dst->_metrics, old, new); in __dst_destroy_metrics_generic()
326 if (prev == old) in __dst_destroy_metrics_generic()
327 kfree(__DST_METRICS_PTR(old)); in __dst_destroy_metrics_generic()
/linux-4.1.27/arch/m68k/include/asm/
Dcmpxchg.h95 static inline unsigned long __cmpxchg(volatile void *p, unsigned long old, in __cmpxchg() argument
101 : "=d" (old), "=m" (*(char *)p) in __cmpxchg()
102 : "d" (new), "0" (old), "m" (*(char *)p)); in __cmpxchg()
106 : "=d" (old), "=m" (*(short *)p) in __cmpxchg()
107 : "d" (new), "0" (old), "m" (*(short *)p)); in __cmpxchg()
111 : "=d" (old), "=m" (*(int *)p) in __cmpxchg()
112 : "d" (new), "0" (old), "m" (*(int *)p)); in __cmpxchg()
115 old = __invalid_cmpxchg_size(p, old, new, size); in __cmpxchg()
118 return old; in __cmpxchg()
Datomic.h125 static inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
132 if (prev == old) in atomic_cmpxchg()
185 int c, old; in __atomic_add_unless() local
190 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
191 if (likely(old == c)) in __atomic_add_unless()
193 c = old; in __atomic_add_unless()
/linux-4.1.27/sound/pci/ice1712/
Dwtm.c81 unsigned char new, old; in stac9460_dac_mute_all() local
91 old = stac9460_get(ice, idx); in stac9460_dac_mute_all()
92 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
93 change = (new != old); in stac9460_dac_mute_all()
110 old = stac9460_2_get(ice, idx); in stac9460_dac_mute_all()
111 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
112 change = (new != old); in stac9460_dac_mute_all()
158 unsigned char new, old; in stac9460_dac_mute_put() local
164 old = stac9460_get(ice, idx); in stac9460_dac_mute_put()
166 (old & ~0x80); in stac9460_dac_mute_put()
[all …]
Dprodigy192.c95 unsigned char new, old; in stac9460_dac_mute() local
97 old = stac9460_get(ice, idx); in stac9460_dac_mute()
98 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute()
99 change = (new != old); in stac9460_dac_mute()
220 unsigned char new, old; in stac9460_adc_mute_put() local
226 old = stac9460_get(ice, reg); in stac9460_adc_mute_put()
227 new = (~ucontrol->value.integer.value[i]<<7&0x80) | (old&~0x80); in stac9460_adc_mute_put()
228 change = (new != old); in stac9460_adc_mute_put()
306 unsigned char new, old; in stac9460_mic_sw_put() local
308 old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_put()
[all …]
Dquartet.c528 unsigned int old, new, smute; in qtet_mute_put() local
529 old = get_scr(ice) & SCR_MUTE; in qtet_mute_put()
541 if (old != new) { in qtet_mute_put()
589 unsigned int old, new, tmp, masked_old; in qtet_ain12_sw_put() local
590 old = new = get_scr(ice); in qtet_ain12_sw_put()
591 masked_old = old & (SCR_AIN12_SEL1 | SCR_AIN12_SEL0); in qtet_ain12_sw_put()
600 new = old & ~(SCR_AIN12_SEL1 | SCR_AIN12_SEL0); in qtet_ain12_sw_put()
608 new = old | SCR_RELAY; in qtet_ain12_sw_put()
615 new = old | SCR_RELAY; in qtet_ain12_sw_put()
644 unsigned int old, new; in qtet_php_put() local
[all …]
Djuli.c224 unsigned char old, tmp, ak4358_dfs; in juli_akm_set_rate_val() local
252 old = inb(ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
253 outb(old | VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
255 outb(old & ~VT1724_AC97_COLD, ICEMT1724(ice, AC97_CMD)); in juli_akm_set_rate_val()
533 unsigned int old, new; in juli_set_rate() local
536 old = ice->gpio.get_data(ice); in juli_set_rate()
537 new = (old & ~GPIO_RATE_MASK) | get_gpio_val(rate); in juli_set_rate()
558 unsigned int old; in juli_set_spdif_clock() local
559 old = ice->gpio.get_data(ice); in juli_set_spdif_clock()
561 ice->gpio.set_data(ice, (old & ~GPIO_RATE_MASK) | GPIO_MULTI_1X | in juli_set_spdif_clock()
/linux-4.1.27/arch/sh/include/asm/
Dbitops-op32.h95 unsigned long old = *p; in __test_and_set_bit() local
97 *p = old | mask; in __test_and_set_bit()
98 return (old & mask) != 0; in __test_and_set_bit()
114 unsigned long old = *p; in __test_and_clear_bit() local
116 *p = old & ~mask; in __test_and_clear_bit()
117 return (old & mask) != 0; in __test_and_clear_bit()
126 unsigned long old = *p; in __test_and_change_bit() local
128 *p = old ^ mask; in __test_and_change_bit()
129 return (old & mask) != 0; in __test_and_change_bit()
Datomic.h52 int c, old; in __atomic_add_unless() local
57 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
58 if (likely(old == c)) in __atomic_add_unless()
60 c = old; in __atomic_add_unless()
Dcmpxchg.h51 static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, in __cmpxchg() argument
56 return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
59 return old; in __cmpxchg()
Dcmpxchg-grb.h48 static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, in __cmpxchg_u32() argument
65 "+r" (old), "+r" (new) /* old or new can be r15 */ in __cmpxchg_u32()
Dcmpxchg-llsc.h47 __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new) in __cmpxchg_u32() argument
64 : "r" (m), "r" (old), "r" (new) in __cmpxchg_u32()
/linux-4.1.27/arch/arc/include/asm/
Dbitops.h80 unsigned long old, temp; \
97 : "=&r"(old), "=&r"(temp) \
103 return (old & (1 << nr)) != 0; \
144 unsigned long old, flags; \
149 old = *m; \
150 *m = old c_op (1UL << (nr & 0x1f)); \
154 return (old & (1UL << (nr & 0x1f))) != 0; \
176 unsigned long old; \
179 old = *m; \
180 *m = old c_op (1UL << (nr & 0x1f)); \
[all …]
/linux-4.1.27/include/asm-generic/
Datomic.h45 int c, old; \
48 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
49 c = old; \
55 int c, old; \
58 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
59 c = old; \
176 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) argument
180 int c, old; in __atomic_add_unless() local
182 while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) in __atomic_add_unless()
183 c = old; in __atomic_add_unless()
Dcmpxchg-local.h15 unsigned long old, unsigned long new, int size) in __cmpxchg_local_generic() argument
28 if (prev == old) in __cmpxchg_local_generic()
32 if (prev == old) in __cmpxchg_local_generic()
36 if (prev == old) in __cmpxchg_local_generic()
40 if (prev == old) in __cmpxchg_local_generic()
54 u64 old, u64 new) in __cmpxchg64_local_generic() argument
61 if (prev == old) in __cmpxchg64_local_generic()
/linux-4.1.27/drivers/gpu/drm/i915/
Dintel_fifo_underrun.c123 bool enable, bool old) in i9xx_set_fifo_underrun_reporting() argument
135 if (old && pipestat & PIPE_FIFO_UNDERRUN_STATUS) in i9xx_set_fifo_underrun_reporting()
155 bool enable, bool old) in ivybridge_set_fifo_underrun_reporting() argument
168 if (old && in ivybridge_set_fifo_underrun_reporting()
207 bool enable, bool old) in cpt_set_fifo_underrun_reporting() argument
222 if (old && I915_READ(SERR_INT) & in cpt_set_fifo_underrun_reporting()
236 bool old; in __intel_set_cpu_fifo_underrun_reporting() local
240 old = !intel_crtc->cpu_fifo_underrun_disabled; in __intel_set_cpu_fifo_underrun_reporting()
244 i9xx_set_fifo_underrun_reporting(dev, pipe, enable, old); in __intel_set_cpu_fifo_underrun_reporting()
248 ivybridge_set_fifo_underrun_reporting(dev, pipe, enable, old); in __intel_set_cpu_fifo_underrun_reporting()
[all …]
/linux-4.1.27/arch/powerpc/kernel/
Dftrace.c45 ftrace_modify_code(unsigned long ip, unsigned int old, unsigned int new) in ftrace_modify_code() argument
64 if (replaced != old) in ftrace_modify_code()
245 unsigned int old, new; in ftrace_make_nop() local
254 old = ftrace_call_replace(ip, addr, 1); in ftrace_make_nop()
256 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
377 unsigned int old, new; in ftrace_make_call() local
386 old = PPC_INST_NOP; in ftrace_make_call()
388 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
412 unsigned int old, new; in ftrace_update_ftrace_func() local
415 old = *(unsigned int *)&ftrace_call; in ftrace_update_ftrace_func()
[all …]
Dsmp-tbsync.c114 int i, score, score2, old, min=0, max=5000, offset=1000; in smp_generic_give_timebase() local
129 for (old = -1; old != offset ; offset = (min+max) / 2) { in smp_generic_give_timebase()
138 old = offset; in smp_generic_give_timebase()
/linux-4.1.27/security/keys/
Dprocess_keys.c222 struct key *old; in install_session_keyring_to_cred() local
242 old = cred->session_keyring; in install_session_keyring_to_cred()
245 if (old) in install_session_keyring_to_cred()
246 key_put(old); in install_session_keyring_to_cred()
755 const struct cred *old; in join_session_keyring() local
763 old = current_cred(); in join_session_keyring()
786 name, old->uid, old->gid, old, in join_session_keyring()
828 const struct cred *old = current_cred(); in key_change_session_keyring() local
836 new-> uid = old-> uid; in key_change_session_keyring()
837 new-> euid = old-> euid; in key_change_session_keyring()
[all …]
/linux-4.1.27/arch/tile/include/gxio/
Ddma_queue.h89 int64_t old = in __gxio_dma_queue_reserve() local
93 if (unlikely(old + modifier < 0)) { in __gxio_dma_queue_reserve()
99 old = __insn_fetchaddgez(&dma_queue->credits_and_next_index, in __gxio_dma_queue_reserve()
101 if (old + modifier < 0) { in __gxio_dma_queue_reserve()
103 old = __gxio_dma_queue_wait_for_credits in __gxio_dma_queue_reserve()
111 slot = (old & 0xffffff); in __gxio_dma_queue_reserve()
135 if (unlikely(((old + num) & 0xff) < num)) { in __gxio_dma_queue_reserve()
/linux-4.1.27/arch/ia64/include/uapi/asm/
Dgcc_intrin.h307 #define ia64_cmpxchg1_acq(ptr, new, old) \ argument
310 asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \
316 #define ia64_cmpxchg1_rel(ptr, new, old) \ argument
319 asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \
325 #define ia64_cmpxchg2_acq(ptr, new, old) \ argument
328 asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \
334 #define ia64_cmpxchg2_rel(ptr, new, old) \ argument
337 asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \
344 #define ia64_cmpxchg4_acq(ptr, new, old) \ argument
347 asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \
[all …]
Dcmpxchg.h72 #define ia64_cmpxchg(sem, ptr, old, new, size) \ argument
78 _o_ = (__u8) (long) (old); \
81 _o_ = (__u16) (long) (old); \
84 _o_ = (__u32) (long) (old); \
87 _o_ = (__u64) (long) (old); \
113 (__typeof__(old)) _r_; \
/linux-4.1.27/arch/mips/include/asm/
Dcmpxchg.h143 #define __cmpxchg_asm(ld, st, m, old, new) \ argument
162 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
179 : GCC_OFF_SMALL_ASM() (*m), "Jr" (old), "Jr" (new) \
186 if (__ret == old) \
200 #define __cmpxchg(ptr, old, new, pre_barrier, post_barrier) \ argument
203 __typeof__(*(ptr)) __old = (old); \
229 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_mb__before_llsc(), smp_llsc_mb()) argument
230 #define cmpxchg_local(ptr, old, new) __cmpxchg(ptr, old, new, , ) argument
Datomic.h225 int c, old; in __atomic_add_unless() local
230 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
231 if (likely(old == c)) in __atomic_add_unless()
233 c = old; in __atomic_add_unless()
507 long c, old; in atomic64_add_unless() local
512 old = atomic64_cmpxchg((v), c, c + (a)); in atomic64_add_unless()
513 if (likely(old == c)) in atomic64_add_unless()
515 c = old; in atomic64_add_unless()
/linux-4.1.27/net/netfilter/
Dnf_conntrack_extend.c75 struct nf_ct_ext *old, *new; in __nf_ct_ext_add_length() local
82 old = ct->ext; in __nf_ct_ext_add_length()
83 if (!old) in __nf_ct_ext_add_length()
86 if (__nf_ct_ext_exist(old, id)) in __nf_ct_ext_add_length()
93 newoff = ALIGN(old->len, t->align); in __nf_ct_ext_add_length()
97 new = __krealloc(old, newlen, gfp); in __nf_ct_ext_add_length()
101 if (new != old) { in __nf_ct_ext_add_length()
103 if (!__nf_ct_ext_exist(old, i)) in __nf_ct_ext_add_length()
110 (void *)old + old->offset[i]); in __nf_ct_ext_add_length()
113 kfree_rcu(old, rcu); in __nf_ct_ext_add_length()
Dnf_conntrack_labels.c54 u32 old, tmp; in replace_u32() local
57 old = *address; in replace_u32()
58 tmp = (old & mask) ^ new; in replace_u32()
59 } while (cmpxchg(address, old, tmp) != old); in replace_u32()
/linux-4.1.27/arch/x86/kernel/
Dftrace.c140 unsigned const char *new, *old; in ftrace_make_nop() local
143 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
155 return ftrace_modify_code_direct(rec->ip, old, new); in ftrace_make_nop()
164 unsigned const char *new, *old; in ftrace_make_call() local
167 old = ftrace_nop_replace(); in ftrace_make_call()
171 return ftrace_modify_code_direct(rec->ip, old, new); in ftrace_make_call()
230 unsigned char old[MCOUNT_INSN_SIZE]; in update_ftrace_func() local
233 memcpy(old, (void *)ip, MCOUNT_INSN_SIZE); in update_ftrace_func()
242 ret = ftrace_modify_code(ip, old, new); in update_ftrace_func()
309 static int add_break(unsigned long ip, const char *old) in add_break() argument
[all …]
Dapb_timer.c370 u64 old, new; in apbt_quick_calibrate() local
379 old = dw_apb_clocksource_read(clocksource_apbt); in apbt_quick_calibrate()
382 if (old != dw_apb_clocksource_read(clocksource_apbt)) in apbt_quick_calibrate()
394 old = dw_apb_clocksource_read(clocksource_apbt); in apbt_quick_calibrate()
395 old += loop; in apbt_quick_calibrate()
401 } while (new < old); in apbt_quick_calibrate()
/linux-4.1.27/scripts/
Dbloat-o-meter31 old = getsizes(sys.argv[1]) variable
36 for a in old:
40 for name in old:
43 down += old[name]
44 delta.append((-old[name], name))
53 d = new.get(name, 0) - old.get(name, 0)
65 if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d))
Ddiffconfig104 old = []
107 old.append(config)
108 old.sort()
109 for config in old:
DMakefile.dtbinst26 $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
27 $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/
Dlibcfs_prim.h73 int old = memory_pressure_get(); in cfs_memory_pressure_get_and_set() local
75 if (!old) in cfs_memory_pressure_get_and_set()
77 return old; in cfs_memory_pressure_get_and_set()
80 static inline void cfs_memory_pressure_restore(int old) in cfs_memory_pressure_restore() argument
82 if (old) in cfs_memory_pressure_restore()
/linux-4.1.27/arch/blackfin/include/asm/
Dcmpxchg.h18 unsigned long new, unsigned long old);
20 unsigned long new, unsigned long old);
22 unsigned long new, unsigned long old);
49 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
56 tmp = __raw_cmpxchg_1_asm(ptr, new, old); in __cmpxchg()
59 tmp = __raw_cmpxchg_2_asm(ptr, new, old); in __cmpxchg()
62 tmp = __raw_cmpxchg_4_asm(ptr, new, old); in __cmpxchg()
/linux-4.1.27/arch/arm64/include/asm/
Datomic.h92 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new) in ATOMIC_OPS()
107 : "Ir" (old), "r" (new) in ATOMIC_OPS()
118 int c, old; in __atomic_add_unless() local
121 while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c) in __atomic_add_unless()
122 c = old; in __atomic_add_unless()
190 static inline long atomic64_cmpxchg(atomic64_t *ptr, long old, long new) in ATOMIC64_OPS()
205 : "Ir" (old), "r" (new) in ATOMIC64_OPS()
236 long c, old; in atomic64_add_unless() local
239 while (c != u && (old = atomic64_cmpxchg((v), c, c + a)) != c) in atomic64_add_unless()
240 c = old; in atomic64_add_unless()
Dcmpxchg.h83 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, in __cmpxchg() argument
99 : "Ir" (old), "r" (new) in __cmpxchg()
114 : "Ir" (old), "r" (new) in __cmpxchg()
129 : "Ir" (old), "r" (new) in __cmpxchg()
144 : "Ir" (old), "r" (new) in __cmpxchg()
201 static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, in __cmpxchg_mb() argument
207 ret = __cmpxchg(ptr, old, new, size); in __cmpxchg_mb()
/linux-4.1.27/fs/
Dfs_struct.c48 static inline int replace_path(struct path *p, const struct path *old, const struct path *new) in replace_path() argument
50 if (likely(p->dentry != old->dentry || p->mnt != old->mnt)) in replace_path()
110 struct fs_struct *copy_fs_struct(struct fs_struct *old) in copy_fs_struct() argument
119 fs->umask = old->umask; in copy_fs_struct()
121 spin_lock(&old->lock); in copy_fs_struct()
122 fs->root = old->root; in copy_fs_struct()
124 fs->pwd = old->pwd; in copy_fs_struct()
126 spin_unlock(&old->lock); in copy_fs_struct()
Dinode.c1009 struct inode *old; in iget5_locked() local
1013 old = find_inode(sb, head, test, data); in iget5_locked()
1014 if (!old) { in iget5_locked()
1038 inode = old; in iget5_locked()
1078 struct inode *old; in iget_locked() local
1082 old = find_inode_fast(sb, head, ino); in iget_locked()
1083 if (!old) { in iget_locked()
1105 inode = old; in iget_locked()
1330 struct inode *old = NULL; in insert_inode_locked() local
1332 hlist_for_each_entry(old, head, i_hash) { in insert_inode_locked()
[all …]
Dnamespace.c955 static struct mount *clone_mnt(struct mount *old, struct dentry *root, in clone_mnt() argument
958 struct super_block *sb = old->mnt.mnt_sb; in clone_mnt()
962 mnt = alloc_vfsmnt(old->mnt_devname); in clone_mnt()
969 mnt->mnt_group_id = old->mnt_group_id; in clone_mnt()
977 mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); in clone_mnt()
997 (!(flag & CL_EXPIRE) || list_empty(&old->mnt_expire))) in clone_mnt()
1010 ((flag & CL_SHARED_TO_SLAVE) && IS_MNT_SHARED(old))) { in clone_mnt()
1011 list_add(&mnt->mnt_slave, &old->mnt_slave_list); in clone_mnt()
1012 mnt->mnt_master = old; in clone_mnt()
1015 if ((flag & CL_MAKE_SHARED) || IS_MNT_SHARED(old)) in clone_mnt()
[all …]
Daio.c352 struct page *old, enum migrate_mode mode) in aio_migratepage() argument
378 idx = old->index; in aio_migratepage()
381 if (ctx->ring_pages[idx] != old) in aio_migratepage()
390 BUG_ON(PageWriteback(old)); in aio_migratepage()
393 rc = migrate_page_move_mapping(mapping, new, old, NULL, mode, 1); in aio_migratepage()
404 migrate_page_copy(new, old); in aio_migratepage()
405 BUG_ON(ctx->ring_pages[idx] != old); in aio_migratepage()
410 put_page(old); in aio_migratepage()
543 kiocb_cancel_fn *old, *cancel; in kiocb_cancel() local
555 old = cancel; in kiocb_cancel()
[all …]
Dtimerfd.c420 struct itimerspec *old) in do_timerfd_settime() argument
469 old->it_value = ktime_to_timespec(timerfd_get_remaining(ctx)); in do_timerfd_settime()
470 old->it_interval = ktime_to_timespec(ctx->tintv); in do_timerfd_settime()
518 struct itimerspec new, old; in SYSCALL_DEFINE4() local
523 ret = do_timerfd_settime(ufd, flags, &new, &old); in SYSCALL_DEFINE4()
526 if (otmr && copy_to_user(otmr, &old, sizeof(old))) in SYSCALL_DEFINE4()
546 struct itimerspec new, old; in COMPAT_SYSCALL_DEFINE4() local
551 ret = do_timerfd_settime(ufd, flags, &new, &old); in COMPAT_SYSCALL_DEFINE4()
554 if (otmr && put_compat_itimerspec(otmr, &old)) in COMPAT_SYSCALL_DEFINE4()
/linux-4.1.27/arch/parisc/kernel/
Dftrace.c111 unsigned long old; in prepare_ftrace_return() local
121 old = *parent; in prepare_ftrace_return()
125 if (unlikely(!__kernel_text_address(old))) { in prepare_ftrace_return()
127 *parent = old; in prepare_ftrace_return()
134 if (push_return_trace(old, calltime, in prepare_ftrace_return()
136 *parent = old; in prepare_ftrace_return()
145 *parent = old; in prepare_ftrace_return()
/linux-4.1.27/kernel/locking/
Dosq_lock.c42 int old; in osq_wait_next() local
49 old = prev ? prev->cpu : OSQ_UNLOCKED_VAL; in osq_wait_next()
53 atomic_cmpxchg(&lock->tail, curr, old) == curr) { in osq_wait_next()
89 int old; in osq_lock() local
95 old = atomic_xchg(&lock->tail, curr); in osq_lock()
96 if (old == OSQ_UNLOCKED_VAL) in osq_lock()
99 prev = decode_cpu(old); in osq_lock()
/linux-4.1.27/arch/frv/include/asm/
Datomic.h179 #define atomic_cmpxchg(v, old, new) (cmpxchg(&(v)->counter, old, new)) argument
181 #define atomic64_cmpxchg(v, old, new) (__cmpxchg_64(old, new, &(v)->counter)) argument
186 int c, old; in __atomic_add_unless() local
191 old = atomic_cmpxchg((v), c, c + (a)); in __atomic_add_unless()
192 if (likely(old == c)) in __atomic_add_unless()
194 c = old; in __atomic_add_unless()
Dbitops.h32 unsigned long old, tmp; in atomic_test_and_ANDNOT_mask() local
44 : "+U"(*v), "=&r"(old), "=r"(tmp) in atomic_test_and_ANDNOT_mask()
49 return old; in atomic_test_and_ANDNOT_mask()
55 unsigned long old, tmp; in atomic_test_and_OR_mask() local
67 : "+U"(*v), "=&r"(old), "=r"(tmp) in atomic_test_and_OR_mask()
72 return old; in atomic_test_and_OR_mask()
78 unsigned long old, tmp; in atomic_test_and_XOR_mask() local
90 : "+U"(*v), "=&r"(old), "=r"(tmp) in atomic_test_and_XOR_mask()
95 return old; in atomic_test_and_XOR_mask()
Dcmpxchg.h150 unsigned long old, 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()
160 return old; in __cmpxchg_local()
/linux-4.1.27/tools/build/feature/
Dtest-sync-compare-and-swap.c7 uint64_t old, new = argc; in main() local
11 old = __sync_val_compare_and_swap(&x, 0, 0); in main()
12 } while (!__sync_bool_compare_and_swap(&x, old, new)); in main()
13 return old == new; in main()
/linux-4.1.27/arch/mips/kernel/
Dsyscall.c101 unsigned long old, tmp; in mips_atomic_set() local
130 : [old] "=&r" (old), in mips_atomic_set()
160 : [old] "=&r" (old), in mips_atomic_set()
174 err = __get_user(old, (unsigned int *) addr); in mips_atomic_set()
186 regs->regs[2] = old; in mips_atomic_set()
/linux-4.1.27/arch/arm/plat-samsung/
Dpm-gpio.c133 u32 gpcon, old, new, mask; in samsung_gpio_pm_2bit_resume() local
146 old = (old_gpcon & mask) >> nr; in samsung_gpio_pm_2bit_resume()
151 if (old == new) in samsung_gpio_pm_2bit_resume()
156 if (is_sfn(old) && is_sfn(new)) in samsung_gpio_pm_2bit_resume()
161 if (is_in(old) && is_out(new)) in samsung_gpio_pm_2bit_resume()
166 if (is_sfn(old) && is_out(new)) in samsung_gpio_pm_2bit_resume()
210 u32 old, new, mask; in samsung_gpio_pm_4bit_mask() local
215 old = (old_gpcon & mask) >> nr; in samsung_gpio_pm_4bit_mask()
220 if (old == new) in samsung_gpio_pm_4bit_mask()
225 if (is_sfn(old) && is_sfn(new)) in samsung_gpio_pm_4bit_mask()
[all …]
/linux-4.1.27/tools/perf/util/
Dsigchain.c7 sigchain_fun *old; member
24 ALLOC_GROW(s->old, s->n + 1, s->alloc); in sigchain_push()
25 s->old[s->n] = signal(sig, f); in sigchain_push()
26 if (s->old[s->n] == SIG_ERR) in sigchain_push()
39 if (signal(sig, s->old[s->n - 1]) == SIG_ERR) in sigchain_pop()
/linux-4.1.27/drivers/firewire/
Dcore-iso.c238 int try, new, old = allocate ? BANDWIDTH_AVAILABLE_INITIAL : 0; in manage_bandwidth() local
247 new = allocate ? old - bandwidth : old + bandwidth; in manage_bandwidth()
251 data[0] = cpu_to_be32(old); in manage_bandwidth()
262 if (be32_to_cpup(data) == old) in manage_bandwidth()
265 old = be32_to_cpup(data); in manage_bandwidth()
276 __be32 bit, all, old; in manage_channel() local
280 old = all = allocate ? cpu_to_be32(~0) : 0; in manage_channel()
289 if ((old & bit) != (all & bit)) in manage_channel()
292 data[0] = old; in manage_channel()
293 data[1] = old ^ bit; in manage_channel()
[all …]
/linux-4.1.27/sound/soc/
Dsoc-io.c68 unsigned int old, new; in snd_soc_component_update_bits_legacy() local
76 ret = component->read(component, reg, &old); in snd_soc_component_update_bits_legacy()
80 new = (old & ~mask) | (val & mask); in snd_soc_component_update_bits_legacy()
81 *change = old != new; in snd_soc_component_update_bits_legacy()
185 unsigned int old, new; in snd_soc_component_test_bits() local
188 ret = snd_soc_component_read(component, reg, &old); in snd_soc_component_test_bits()
191 new = (old & ~mask) | value; in snd_soc_component_test_bits()
192 return old != new; in snd_soc_component_test_bits()
/linux-4.1.27/tools/power/x86/turbostat/
Dturbostat.c669 #define DELTA_WRAP32(new, old) \ argument
670 if (new > old) { \
671 old = new - old; \
673 old = 0x100000000 + new - old; \
677 delta_package(struct pkg_data *new, struct pkg_data *old) in delta_package() argument
681 old->pkg_wtd_core_c0 = new->pkg_wtd_core_c0 - old->pkg_wtd_core_c0; in delta_package()
682 old->pkg_any_core_c0 = new->pkg_any_core_c0 - old->pkg_any_core_c0; in delta_package()
683 old->pkg_any_gfxe_c0 = new->pkg_any_gfxe_c0 - old->pkg_any_gfxe_c0; in delta_package()
684 old->pkg_both_core_gfxe_c0 = new->pkg_both_core_gfxe_c0 - old->pkg_both_core_gfxe_c0; in delta_package()
686 old->pc2 = new->pc2 - old->pc2; in delta_package()
[all …]
/linux-4.1.27/fs/pstore/
Dram_core.c53 int old; in buffer_start_add_atomic() local
57 old = atomic_read(&prz->buffer->start); in buffer_start_add_atomic()
58 new = old + a; in buffer_start_add_atomic()
61 } while (atomic_cmpxchg(&prz->buffer->start, old, new) != old); in buffer_start_add_atomic()
63 return old; in buffer_start_add_atomic()
69 size_t old; in buffer_size_add_atomic() local
76 old = atomic_read(&prz->buffer->size); in buffer_size_add_atomic()
77 new = old + a; in buffer_size_add_atomic()
80 } while (atomic_cmpxchg(&prz->buffer->size, old, new) != old); in buffer_size_add_atomic()
88 int old; in buffer_start_add_locked() local
[all …]
/linux-4.1.27/drivers/mtd/
Dmtd_blkdevs.c461 int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old) in del_mtd_blktrans_dev() argument
470 if (old->disk_attributes) in del_mtd_blktrans_dev()
471 sysfs_remove_group(&disk_to_dev(old->disk)->kobj, in del_mtd_blktrans_dev()
472 old->disk_attributes); in del_mtd_blktrans_dev()
475 del_gendisk(old->disk); in del_mtd_blktrans_dev()
478 destroy_workqueue(old->wq); in del_mtd_blktrans_dev()
481 spin_lock_irqsave(&old->queue_lock, flags); in del_mtd_blktrans_dev()
482 old->rq->queuedata = NULL; in del_mtd_blktrans_dev()
483 blk_start_queue(old->rq); in del_mtd_blktrans_dev()
484 spin_unlock_irqrestore(&old->queue_lock, flags); in del_mtd_blktrans_dev()
[all …]
/linux-4.1.27/arch/sh/boot/compressed/
Dinstall.sh34 mv $4/vmlinuz-$1 $4/vmlinuz.old
38 mv $4/System.map-$1 $4/System.old
47 mv $4/vmlinux-$1 $4/vmlinux.old
51 mv $4/System.map $4/System.old
/linux-4.1.27/arch/m32r/boot/compressed/
Dinstall.sh35 mv $4/vmlinuz-$1 $4/vmlinuz.old
39 mv $4/System.map-$1 $4/System.old
48 mv $4/vmlinux-$1 $4/vmlinux.old
52 mv $4/System.map $4/System.old
/linux-4.1.27/Documentation/zh_CN/arm/
Dkernel_user_helpers.txt78 fprintf(stderr, "can't do atomic operations, kernel too old\n");
168 int old, new;
171 old = *ptr;
172 new = old + val;
173 } while(__kuser_cmpxchg(old, new, ptr));
266 int64_t old, new;
269 old = *ptr;
270 new = old + val;
271 } while(__kuser_cmpxchg64(&old, &new, ptr));
/linux-4.1.27/drivers/s390/scsi/
Dzfcp_scsi.c388 struct fsf_qtcb_bottom_port *old) in zfcp_adjust_fc_host_stats() argument
391 data->seconds_since_last_reset - old->seconds_since_last_reset; in zfcp_adjust_fc_host_stats()
392 fc_stats->tx_frames = data->tx_frames - old->tx_frames; in zfcp_adjust_fc_host_stats()
393 fc_stats->tx_words = data->tx_words - old->tx_words; in zfcp_adjust_fc_host_stats()
394 fc_stats->rx_frames = data->rx_frames - old->rx_frames; in zfcp_adjust_fc_host_stats()
395 fc_stats->rx_words = data->rx_words - old->rx_words; in zfcp_adjust_fc_host_stats()
396 fc_stats->lip_count = data->lip - old->lip; in zfcp_adjust_fc_host_stats()
397 fc_stats->nos_count = data->nos - old->nos; in zfcp_adjust_fc_host_stats()
398 fc_stats->error_frames = data->error_frames - old->error_frames; in zfcp_adjust_fc_host_stats()
399 fc_stats->dumped_frames = data->dumped_frames - old->dumped_frames; in zfcp_adjust_fc_host_stats()
[all …]
/linux-4.1.27/arch/powerpc/mm/
Dpgtable_64.c528 unsigned long old, tmp; in pmd_hugepage_update() local
544 : "=&r" (old), "=&r" (tmp), "=m" (*pmdp) in pmd_hugepage_update()
548 old = pmd_val(*pmdp); in pmd_hugepage_update()
549 *pmdp = __pmd((old & ~clr) | set); in pmd_hugepage_update()
551 trace_hugepage_update(addr, old, clr, set); in pmd_hugepage_update()
552 if (old & _PAGE_HASHPTE) in pmd_hugepage_update()
553 hpte_do_hugepage_flush(mm, addr, pmdp, old); in pmd_hugepage_update()
554 return old; in pmd_hugepage_update()
628 unsigned long old, tmp; in pmdp_splitting_flush() local
646 : "=&r" (old), "=&r" (tmp), "=m" (*pmdp) in pmdp_splitting_flush()
[all …]
/linux-4.1.27/arch/sh/kernel/cpu/sh3/
Dswsusp.S116 stc r2_bank, k0 ! fetch old sp from r2_bank0
120 stc r0_bank, k3 ! fetch old pr from r0_bank0
123 mov r2, r15 ! restore old sp
124 mov r5, r8 ! restore old r8
126 ldc r1, sr ! restore old sr
127 lds r0, pr ! restore old pr
133 mov r2, r15 ! restore old sp
134 mov r5, r8 ! restore old r8
135 lds r0, pr ! restore old pr
/linux-4.1.27/arch/s390/kvm/
Dgaccess.c271 union ipte_control old, new, *ic; in ipte_lock_simple() local
279 old = READ_ONCE(*ic); in ipte_lock_simple()
280 while (old.k) { in ipte_lock_simple()
282 old = READ_ONCE(*ic); in ipte_lock_simple()
284 new = old; in ipte_lock_simple()
286 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_lock_simple()
293 union ipte_control old, new, *ic; in ipte_unlock_simple() local
301 old = READ_ONCE(*ic); in ipte_unlock_simple()
302 new = old; in ipte_unlock_simple()
304 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_unlock_simple()
[all …]
/linux-4.1.27/arch/frv/mm/
Dmmu-context.c90 void change_mm_context(mm_context_t *old, mm_context_t *ctx, pgd_t *pgd) in change_mm_context() argument
97 old->id_busy = 0; in change_mm_context()
99 asm volatile("movsg scr0,%0" : "=r"(old->itlb_cached_pge)); in change_mm_context()
100 asm volatile("movsg dampr4,%0" : "=r"(old->itlb_ptd_mapping)); in change_mm_context()
101 asm volatile("movsg scr1,%0" : "=r"(old->dtlb_cached_pge)); in change_mm_context()
102 asm volatile("movsg dampr5,%0" : "=r"(old->dtlb_ptd_mapping)); in change_mm_context()
/linux-4.1.27/arch/mn10300/include/asm/
Dcmpxchg.h40 unsigned long old, unsigned long new) in __cmpxchg() argument
57 "r"(old), "r"(new) in __cmpxchg()
91 unsigned long old, unsigned long new) in __cmpxchg() argument
98 if (oldval == old) in __cmpxchg()
Datomic.h120 int c, old; \
122 while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
123 c = old; \
128 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) argument
/linux-4.1.27/tools/perf/util/include/linux/
Dbitmap.h58 unsigned long old; in test_and_set_bit() local
60 old = *p; in test_and_set_bit()
61 *p = old | mask; in test_and_set_bit()
63 return (old & mask) != 0; in test_and_set_bit()
/linux-4.1.27/arch/parisc/lib/
Dbitops.c59 unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
65 if ((prev = *ptr) == old) in __cmpxchg_u64()
72 unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsigned int new) in __cmpxchg_u32() argument
78 if ((prev = *ptr) == old) in __cmpxchg_u32()
/linux-4.1.27/drivers/scsi/sym53c8xx_2/
Dsym_fw.c367 u32 opcode, new, old, tmp1, tmp2; in sym_fw_bind_script() local
518 old = *cur; in sym_fw_bind_script()
520 switch (old & RELOC_MASK) { in sym_fw_bind_script()
522 new = (old & ~RELOC_MASK) + np->mmio_ba; in sym_fw_bind_script()
525 new = (old & ~RELOC_MASK) + np->scripta_ba; in sym_fw_bind_script()
528 new = (old & ~RELOC_MASK) + np->scriptb_ba; in sym_fw_bind_script()
531 new = (old & ~RELOC_MASK) + np->hcb_ba; in sym_fw_bind_script()
539 if (old == 0) { in sym_fw_bind_script()
540 new = old; in sym_fw_bind_script()
547 "weird relocation %x\n", old); in sym_fw_bind_script()
/linux-4.1.27/arch/m68k/amiga/
Dcia.c53 unsigned char old; in cia_set_irq() local
55 old = (base->icr_data |= base->cia->icr); in cia_set_irq()
62 return old & base->icr_mask; in cia_set_irq()
71 unsigned char old; in cia_able_irq() local
73 old = base->icr_mask; in cia_able_irq()
83 return old; in cia_able_irq()
/linux-4.1.27/drivers/xen/events/
Devents_fifo.c234 event_word_t new, old, w; in clear_masked() local
239 old = w & ~(1 << EVTCHN_FIFO_BUSY); in clear_masked()
240 new = old & ~(1 << EVTCHN_FIFO_MASKED); in clear_masked()
241 w = sync_cmpxchg(word, old, new); in clear_masked()
242 } while (w != old); in clear_masked()
260 event_word_t new, old, w; in clear_linked() local
265 old = w; in clear_linked()
268 } while ((w = sync_cmpxchg(word, old, new)) != old); in clear_linked()
/linux-4.1.27/net/sched/
Dsch_prio.c202 struct Qdisc *child, *old; in prio_tune() local
209 old = q->queues[i]; in prio_tune()
212 if (old != &noop_qdisc) { in prio_tune()
213 qdisc_tree_decrease_qlen(old, in prio_tune()
214 old->q.qlen); in prio_tune()
215 qdisc_destroy(old); in prio_tune()
263 struct Qdisc **old) in prio_graft() argument
272 *old = q->queues[band]; in prio_graft()
274 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); in prio_graft()
275 qdisc_reset(*old); in prio_graft()
Dsch_multiq.c230 struct Qdisc *child, *old; in multiq_tune() local
237 old = q->queues[i]; in multiq_tune()
240 if (old != &noop_qdisc) { in multiq_tune()
241 qdisc_tree_decrease_qlen(old, in multiq_tune()
242 old->q.qlen); in multiq_tune()
243 qdisc_destroy(old); in multiq_tune()
298 struct Qdisc **old) in multiq_graft() argument
307 *old = q->queues[band]; in multiq_graft()
309 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); in multiq_graft()
310 qdisc_reset(*old); in multiq_graft()
Dsch_mq.c81 struct Qdisc *qdisc, *old; in mq_attach() local
86 old = dev_graft_qdisc(qdisc->dev_queue, qdisc); in mq_attach()
87 if (old) in mq_attach()
88 qdisc_destroy(old); in mq_attach()
149 struct Qdisc **old) in mq_graft() argument
157 *old = dev_graft_qdisc(dev_queue, new); in mq_graft()
/linux-4.1.27/arch/powerpc/boot/
Dinstall.sh35 mv $4/$image_name $4/$image_name.old
39 mv $4/System.map $4/System.old
51 mv $path/$image_name $path/$image_name.old
/linux-4.1.27/arch/tile/include/asm/
Datomic.h191 long long c, old, dec; in atomic64_dec_if_positive() local
198 old = atomic64_cmpxchg((v), c, dec); in atomic64_dec_if_positive()
199 if (likely(old == c)) in atomic64_dec_if_positive()
201 c = old; in atomic64_dec_if_positive()
/linux-4.1.27/arch/microblaze/kernel/
Dftrace.c24 unsigned long old; in prepare_ftrace_return() local
53 : "=&r" (old), "=r" (faulted) in prepare_ftrace_return()
66 err = ftrace_push_return_trace(old, self_addr, &trace.depth, 0); in prepare_ftrace_return()
68 *parent = old; in prepare_ftrace_return()
76 *parent = old; in prepare_ftrace_return()
/linux-4.1.27/drivers/gpu/host1x/hw/
Dsyncpt_hw.c60 u32 old, live; in syncpt_load() local
64 old = host1x_syncpt_read_min(sp); in syncpt_load()
66 } while ((u32)atomic_cmpxchg(&sp->min_val, old, live) != old); in syncpt_load()
/linux-4.1.27/fs/notify/
Dmark.c455 void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *old) in fsnotify_duplicate_mark() argument
457 assert_spin_locked(&old->lock); in fsnotify_duplicate_mark()
458 new->inode = old->inode; in fsnotify_duplicate_mark()
459 new->mnt = old->mnt; in fsnotify_duplicate_mark()
460 if (old->group) in fsnotify_duplicate_mark()
461 fsnotify_get_group(old->group); in fsnotify_duplicate_mark()
462 new->group = old->group; in fsnotify_duplicate_mark()
463 new->mask = old->mask; in fsnotify_duplicate_mark()
464 new->free_mark = old->free_mark; in fsnotify_duplicate_mark()
/linux-4.1.27/arch/powerpc/kvm/
Dtiming.c57 u64 old; in add_exit_timing() local
64 old = vcpu->arch.timing_sum_duration[type]; in add_exit_timing()
66 if (unlikely(old > vcpu->arch.timing_sum_duration[type])) { in add_exit_timing()
69 __func__, old, vcpu->arch.timing_sum_duration[type], in add_exit_timing()
74 old = vcpu->arch.timing_sum_quad_duration[type]; in add_exit_timing()
76 if (unlikely(old > vcpu->arch.timing_sum_quad_duration[type])) { in add_exit_timing()
79 __func__, old, in add_exit_timing()
/linux-4.1.27/fs/notify/inotify/
Dinotify_fsnotify.c42 struct inotify_event_info *old, *new; in event_compare() local
46 old = INOTIFY_E(old_fsn); in event_compare()
50 (old->name_len == new->name_len) && in event_compare()
51 (!old->name_len || !strcmp(old->name, new->name))) in event_compare()
/linux-4.1.27/drivers/staging/lustre/lustre/ldlm/
Dinterval_tree.c521 struct interval_node *old = node; in interval_erase() local
530 if (parent == old) in interval_erase()
535 node->in_color = old->in_color; in interval_erase()
536 node->in_right = old->in_right; in interval_erase()
537 node->in_left = old->in_left; in interval_erase()
538 node->in_parent = old->in_parent; in interval_erase()
540 if (old->in_parent) { in interval_erase()
541 if (node_is_left_child(old)) in interval_erase()
542 old->in_parent->in_left = node; in interval_erase()
544 old->in_parent->in_right = node; in interval_erase()
[all …]
/linux-4.1.27/fs/ext4/
Dnamei.c1228 struct dx_entry *old = frame->at, *new = old + 1; in dx_insert_block() local
1232 assert(old < entries + count); in dx_insert_block()
3553 struct ext4_renament old = { in ext4_rename() local
3569 dquot_initialize(old.dir); in ext4_rename()
3577 old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, NULL); in ext4_rename()
3578 if (IS_ERR(old.bh)) in ext4_rename()
3579 return PTR_ERR(old.bh); in ext4_rename()
3587 if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino) in ext4_rename()
3590 if ((old.dir != new.dir) && in ext4_rename()
3593 old.inode)) { in ext4_rename()
[all …]
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
Dllite_capa.c398 struct obd_capa *old = lli->lli_mds_capa; in do_add_mds_capa() local
401 if (!old) { in do_add_mds_capa()
408 spin_lock(&old->c_lock); in do_add_mds_capa()
409 old->c_capa = *capa; in do_add_mds_capa()
410 spin_unlock(&old->c_lock); in do_add_mds_capa()
415 ocapa = old; in do_add_mds_capa()
463 struct obd_capa *old; in do_add_oss_capa() local
471 old = do_lookup_oss_capa(inode, capa_opc(capa) & CAPA_OPC_OSS_ONLY); in do_add_oss_capa()
472 if (!old) { in do_add_oss_capa()
479 spin_lock(&old->c_lock); in do_add_oss_capa()
[all …]
/linux-4.1.27/sound/aoa/core/
Dgpio-pmf.c136 notify_func_t old; in pmf_set_notify() local
160 old = notif->notify; in pmf_set_notify()
162 if (!old && !notify) { in pmf_set_notify()
167 if (old && notify) { in pmf_set_notify()
168 if (old == notify && notif->data == data) in pmf_set_notify()
173 if (old && !notify) { in pmf_set_notify()
179 if (!old && notify) { in pmf_set_notify()
Dgpio-feature.c314 notify_func_t old; in ftr_set_notify() local
344 old = notif->notify; in ftr_set_notify()
346 if (!old && !notify) { in ftr_set_notify()
351 if (old && notify) { in ftr_set_notify()
352 if (old == notify && notif->data == data) in ftr_set_notify()
357 if (old && !notify) in ftr_set_notify()
360 if (!old && notify) { in ftr_set_notify()
/linux-4.1.27/arch/x86/um/
Dbugs_32.c24 struct sigaction old, new; in arch_check_bugs() local
32 sigaction(SIGILL, &new, &old); in arch_check_bugs()
41 sigaction(SIGILL, &old, &new); in arch_check_bugs()
/linux-4.1.27/arch/tile/gxio/
Ddma_queue.c131 int64_t old; in __gxio_dma_queue_wait_for_credits() local
141 old = __insn_fetchaddgez(&dma_queue->credits_and_next_index, in __gxio_dma_queue_wait_for_credits()
147 } while (old + modifier < 0); in __gxio_dma_queue_wait_for_credits()
149 return old; in __gxio_dma_queue_wait_for_credits()
/linux-4.1.27/mm/
Dswap_cgroup.c88 unsigned short old, unsigned short new) in swap_cgroup_cmpxchg() argument
99 if (retval == old) in swap_cgroup_cmpxchg()
119 unsigned short old; in swap_cgroup_record() local
125 old = sc->id; in swap_cgroup_record()
129 return old; in swap_cgroup_record()
Dpage_counter.c137 unsigned long old; in page_counter_limit() local
156 old = xchg(&counter->limit, limit); in page_counter_limit()
161 counter->limit = old; in page_counter_limit()
/linux-4.1.27/arch/arc/kernel/
Dsmp.c212 unsigned long old, new; in ipi_send_msg_one() local
224 new = old = ACCESS_ONCE(*ipi_data_ptr); in ipi_send_msg_one()
226 } while (cmpxchg(ipi_data_ptr, old, new) != old); in ipi_send_msg_one()
236 if (plat_smp_ops.ipi_send && !old) in ipi_send_msg_one()
/linux-4.1.27/drivers/ide/
Dtrm290.c281 u16 new, old, compat = hwif->channel ? 0x374 : 0x3f4; in init_hwif_trm290() local
286 old = inw(hwif->config_data); in init_hwif_trm290()
287 old &= ~1; in init_hwif_trm290()
288 old_mask = inb(old + 2); in init_hwif_trm290()
289 if (old != compat && old_mask == 0xff) { in init_hwif_trm290()
297 hwif->name, old, new & ~1); in init_hwif_trm290()
/linux-4.1.27/fs/overlayfs/
Ddir.c481 static int ovl_link(struct dentry *old, struct inode *newdir, in ovl_link() argument
487 err = ovl_want_write(old); in ovl_link()
491 err = ovl_copy_up(old); in ovl_link()
495 upper = ovl_dentry_upper(old); in ovl_link()
499 ovl_drop_write(old); in ovl_link()
703 static int ovl_rename2(struct inode *olddir, struct dentry *old, in ovl_rename2() argument
720 bool is_dir = d_is_dir(old); in ovl_rename2()
732 err = ovl_check_sticky(old); in ovl_rename2()
737 old_type = ovl_path_type(old); in ovl_rename2()
757 if (ovl_dentry_lower(old)->d_inode == in ovl_rename2()
[all …]
Dcopy_up.c23 int ovl_copy_xattr(struct dentry *old, struct dentry *new) in ovl_copy_xattr() argument
29 if (!old->d_inode->i_op->getxattr || in ovl_copy_xattr()
33 list_size = vfs_listxattr(old, NULL, 0); in ovl_copy_xattr()
44 list_size = vfs_listxattr(old, buf, list_size); in ovl_copy_xattr()
52 size = vfs_getxattr(old, name, value, value_size); in ovl_copy_xattr()
54 size = vfs_getxattr(old, name, NULL, 0); in ovl_copy_xattr()
84 static int ovl_copy_up_data(struct path *old, struct path *new, loff_t len) in ovl_copy_up_data() argument
95 old_file = ovl_path_open(old, O_LARGEFILE | O_RDONLY); in ovl_copy_up_data()
/linux-4.1.27/drivers/md/persistent-data/
Ddm-space-map-common.c388 int (*mutator)(void *context, uint32_t old, uint32_t *new), in sm_ll_mutate() argument
392 uint32_t bit, old, ref_count; in sm_ll_mutate() local
413 old = sm_lookup_bitmap(bm_le, bit); in sm_ll_mutate()
415 if (old > 2) { in sm_ll_mutate()
416 r = sm_ll_lookup_big_ref_count(ll, b, &old); in sm_ll_mutate()
423 r = mutator(context, old, &ref_count); in sm_ll_mutate()
436 if (old > 2) { in sm_ll_mutate()
461 if (ref_count && !old) { in sm_ll_mutate()
468 } else if (old && !ref_count) { in sm_ll_mutate()
478 static int set_ref_count(void *context, uint32_t old, uint32_t *new) in set_ref_count() argument
[all …]
/linux-4.1.27/drivers/of/
Dirq.c97 struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; in of_irq_parse_raw() local
137 old = of_node_get(ipar); in of_irq_parse_raw()
139 tmp = of_get_property(old, "#address-cells", NULL); in of_irq_parse_raw()
140 tnode = of_get_parent(old); in of_irq_parse_raw()
141 of_node_put(old); in of_irq_parse_raw()
142 old = tnode; in of_irq_parse_raw()
143 } while (old && tmp == NULL); in of_irq_parse_raw()
144 of_node_put(old); in of_irq_parse_raw()
145 old = NULL; in of_irq_parse_raw()
/linux-4.1.27/arch/arm/mach-u300/
Dregulator.c40 sigset_t old, all; in u300_pm_poweroff() local
43 if (!sigprocmask(SIG_BLOCK, &all, &old)) { in u300_pm_poweroff()
49 (void) sigprocmask(SIG_SETMASK, &old, NULL); in u300_pm_poweroff()
/linux-4.1.27/arch/m68k/mvme16x/
Dconfig.c331 unsigned long *old = (unsigned long *)0xffe00000; in mvme16x_abort_int() local
345 *(new+4) = *(old+4); /* Illegal instruction */ in mvme16x_abort_int()
346 *(new+9) = *(old+9); /* Trace */ in mvme16x_abort_int()
347 *(new+47) = *(old+47); /* Trap #15 */ in mvme16x_abort_int()
350 *(new+0x5e) = *(old+0x5e); /* ABORT switch */ in mvme16x_abort_int()
352 *(new+0x6e) = *(old+0x6e); /* ABORT switch */ in mvme16x_abort_int()
/linux-4.1.27/security/apparmor/
Dpolicy.c977 static void __replace_profile(struct aa_profile *old, struct aa_profile *new, in __replace_profile() argument
982 if (!list_empty(&old->base.profiles)) { in __replace_profile()
984 list_splice_init_rcu(&old->base.profiles, &lh, synchronize_rcu); in __replace_profile()
1008 struct aa_profile *parent = aa_deref_parent(old); in __replace_profile()
1011 __aa_update_replacedby(old, new); in __replace_profile()
1014 new->replacedby = aa_get_replacedby(old->replacedby); in __replace_profile()
1019 __aa_fs_profile_migrate_dents(old, new); in __replace_profile()
1023 list_replace_rcu(&old->base.list, &new->base.list); in __replace_profile()
1025 aa_put_profile(old); in __replace_profile()
1027 __list_remove_profile(old); in __replace_profile()
[all …]
Dresource.c121 void __aa_transition_rlimits(struct aa_profile *old, struct aa_profile *new) in __aa_transition_rlimits() argument
130 if (old->rlimits.mask) { in __aa_transition_rlimits()
132 if (old->rlimits.mask & mask) { in __aa_transition_rlimits()
/linux-4.1.27/scripts/dtc/libfdt/
Dfdt_rw.c394 static void _fdt_packblocks(const char *old, char *new, in _fdt_packblocks() argument
403 memmove(new + mem_rsv_off, old + fdt_off_mem_rsvmap(old), mem_rsv_size); in _fdt_packblocks()
406 memmove(new + struct_off, old + fdt_off_dt_struct(old), struct_size); in _fdt_packblocks()
410 memmove(new + strings_off, old + fdt_off_dt_strings(old), in _fdt_packblocks()
411 fdt_size_dt_strings(old)); in _fdt_packblocks()
413 fdt_set_size_dt_strings(new, fdt_size_dt_strings(old)); in _fdt_packblocks()
/linux-4.1.27/arch/x86/kernel/acpi/
Dboot.c580 unsigned int old, new; in acpi_pic_sci_set_trigger() local
583 old = inb(0x4d0) | (inb(0x4d1) << 8); in acpi_pic_sci_set_trigger()
590 new = acpi_noirq ? old : 0; in acpi_pic_sci_set_trigger()
605 if (old == new) in acpi_pic_sci_set_trigger()
608 printk(PREFIX "setting ELCR to %04x (from %04x)\n", new, old); in acpi_pic_sci_set_trigger()
1703 unsigned int old, new, val; in __acpi_acquire_global_lock() local
1705 old = *lock; in __acpi_acquire_global_lock()
1706 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); in __acpi_acquire_global_lock()
1707 val = cmpxchg(lock, old, new); in __acpi_acquire_global_lock()
1708 } while (unlikely (val != old)); in __acpi_acquire_global_lock()
[all …]
/linux-4.1.27/drivers/md/bcache/
Dio.c166 unsigned old = count; in bch_count_io_errors() local
174 count = atomic_cmpxchg(&ca->io_count, old, new); in bch_count_io_errors()
176 if (count == old) { in bch_count_io_errors()
181 old = errors; in bch_count_io_errors()
184 old, new); in bch_count_io_errors()
185 } while (old != errors); in bch_count_io_errors()
/linux-4.1.27/fs/isofs/
Ddir.c18 char * old = de->name; in isofs_name_translate() local
23 unsigned char c = old[i]; in isofs_name_translate()
31 if (c == '.' && i == len - 3 && old[i + 1] == ';' && old[i + 2] == '1') in isofs_name_translate()
35 if (c == ';' && i == len - 2 && old[i + 1] == '1') in isofs_name_translate()
/linux-4.1.27/arch/x86/um/os-Linux/
Dtask_size.c69 struct sigaction sa, old; in os_get_top_address() local
92 if (sigaction(SIGSEGV, &sa, &old)) { in os_get_top_address()
132 if (sigaction(SIGSEGV, &old, NULL)) { in os_get_top_address()
/linux-4.1.27/arch/s390/boot/
Dinstall.sh30 mv $4/vmlinuz $4/vmlinuz.old
34 mv $4/System.map $4/System.old
/linux-4.1.27/arch/sparc/boot/
Dinstall.sh42 mv $4/vmlinuz $4/vmlinuz.old
46 mv $4/System.map $4/System.old
/linux-4.1.27/arch/nios2/boot/
Dinstall.sh42 mv $4/vmlinuz $4/vmlinuz.old
46 mv $4/System.map $4/System.old
/linux-4.1.27/arch/m68k/
Dinstall.sh42 mv $4/vmlinuz $4/vmlinuz.old
46 mv $4/System.map $4/System.old
/linux-4.1.27/arch/arm64/boot/
Dinstall.sh38 mv $4/$base-$1 $4/$base-$1.old
44 mv $4/System.map-$1 $4/System.map-$1.old
/linux-4.1.27/arch/ia64/
Dinstall.sh30 mv $4/vmlinuz $4/vmlinuz.old
34 mv $4/System.map $4/System.old
/linux-4.1.27/fs/notify/fanotify/
Dfanotify.c17 struct fanotify_event_info *old, *new; in should_merge() local
20 old = FANOTIFY_E(old_fsn); in should_merge()
23 if (old_fsn->inode == new_fsn->inode && old->tgid == new->tgid && in should_merge()
24 old->path.mnt == new->path.mnt && in should_merge()
25 old->path.dentry == new->path.dentry) in should_merge()
/linux-4.1.27/arch/m68k/bvme6000/
Dconfig.c147 unsigned long *old = (unsigned long *)0xf8000000; in bvme6000_abort_int() local
153 *(new+4) = *(old+4); /* Illegal instruction */ in bvme6000_abort_int()
154 *(new+9) = *(old+9); /* Trace */ in bvme6000_abort_int()
155 *(new+47) = *(old+47); /* Trap #15 */ in bvme6000_abort_int()
156 *(new+0x1f) = *(old+0x1f); /* ABORT switch */ in bvme6000_abort_int()
/linux-4.1.27/drivers/staging/lustre/lustre/include/linux/
Dlustre_compat25.h79 #define ll_vfs_link(old, mnt, dir, new, mnt1) vfs_link(old, dir, new) argument
85 #define ll_vfs_rename(old, old_dir, mnt, new, new_dir, mnt1) \ argument
86 vfs_rename(old, old_dir, new, new_dir, NULL, 0)
/linux-4.1.27/arch/parisc/
Dinstall.sh57 mv $4/$base-$1 $4/$base-$1.old
63 mv $4/System.map-$1 $4/System.map-$1.old
/linux-4.1.27/arch/arm/boot/
Dinstall.sh52 mv $4/$base-$1 $4/$base-$1.old
58 mv $4/System.map-$1 $4/System.map-$1.old
/linux-4.1.27/arch/x86/boot/
Dinstall.sh42 mv $4/vmlinuz $4/vmlinuz.old
46 mv $4/System.map $4/System.old
/linux-4.1.27/net/mpls/
Daf_mpls.c280 struct mpls_route *old, struct mpls_route *new, in mpls_notify_route() argument
286 struct mpls_route *rt = new ? new : old; in mpls_notify_route()
287 unsigned nlm_flags = (old && new) ? NLM_F_REPLACE : 0; in mpls_notify_route()
298 struct mpls_route *rt, *old = NULL; in mpls_route_update() local
306 old = rt; in mpls_route_update()
309 mpls_notify_route(net, index, old, new, info); in mpls_route_update()
312 mpls_rt_free(old); in mpls_route_update()
335 struct mpls_route *rt, *old; in mpls_route_add() local
382 old = rtnl_dereference(platform_label[index]); in mpls_route_add()
383 if ((cfg->rc_nlflags & NLM_F_EXCL) && old) in mpls_route_add()
[all …]
/linux-4.1.27/drivers/tty/serial/8250/
D8250_mtk.c41 struct ktermios *old) in mtk8250_set_termios() argument
49 serial8250_do_set_termios(port, termios, old); in mtk8250_set_termios()
64 baud = uart_get_baud_rate(port, termios, old, in mtk8250_set_termios()
119 mtk8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old) in mtk8250_do_pm() argument
124 serial8250_do_pm(port, state, old); in mtk8250_do_pm()
/linux-4.1.27/arch/arm/mach-s3c24xx/
Dmach-osiris-dvs.c60 bool old_dvs = is_dvs(&freqs->old); in osiris_dvs_notify()
68 freqs->old.armclk, freqs->old.hclk, in osiris_dvs_notify()
/linux-4.1.27/drivers/pcmcia/
Dpxa2xx_base.c194 if (freqs->new > freqs->old) { in pxa2xx_pcmcia_frequency_change()
198 freqs->old / 1000, (freqs->old / 100) % 10); in pxa2xx_pcmcia_frequency_change()
204 if (freqs->new < freqs->old) { in pxa2xx_pcmcia_frequency_change()
208 freqs->old / 1000, (freqs->old / 100) % 10); in pxa2xx_pcmcia_frequency_change()
/linux-4.1.27/arch/hexagon/include/asm/
Dcmpxchg.h69 #define cmpxchg(ptr, old, new) \ argument
72 __typeof__(*(ptr)) __old = (old); \

1234567