Home
last modified time | relevance | path

Searched refs:old (Results 1 – 25 of 1386) sorted by relevance

12345678910>>...56

/linux/arch/sh/include/asm/
H A Dbitops-cas.h5 static inline unsigned __bo_cas(volatile unsigned *p, unsigned old, unsigned new) in __bo_cas() argument
9 : "r"(old), "z"(p) in __bo_cas()
16 unsigned mask, old; in set_bit() local
22 do old = *a; in set_bit()
23 while (__bo_cas(a, old, old|mask) != old); in set_bit()
28 unsigned mask, old; in clear_bit() local
34 do old = *a; in clear_bit()
35 while (__bo_cas(a, old, old&~mask) != old); in clear_bit()
40 unsigned mask, old; in change_bit() local
46 do old = *a; in change_bit()
[all …]
H A Dspinlock-cas.h13 static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) in __sl_cas() argument
17 : "r"(old), "z"(p) in __sl_cas()
54 unsigned old; in arch_read_lock() local
55 do old = rw->lock; in arch_read_lock()
56 while (!old || __sl_cas(&rw->lock, old, old-1) != old); in arch_read_lock()
61 unsigned old; in arch_read_unlock() local
62 do old = rw->lock; in arch_read_unlock()
63 while (__sl_cas(&rw->lock, old, old+1) != old); in arch_read_unlock()
78 unsigned old; in arch_read_trylock() local
79 do old = rw->lock; in arch_read_trylock()
[all …]
/linux/arch/powerpc/include/asm/
H A Dcmpxchg.h42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \
49 old <<= bitoff; \
67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \
283 __cmpxchg_u8(volatile unsigned char *p, unsigned long old, unsigned long new) in __cmpxchg_u8() argument
298 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8()
305 __cmpxchg_u8_local(volatile unsigned char *p, unsigned long old, in __cmpxchg_u8_local() argument
318 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8_local()
325 __cmpxchg_u8_relaxed(u8 *p, unsigned long old, unsigned long new) in __cmpxchg_u8_relaxed() argument
337 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8_relaxed()
344 __cmpxchg_u8_acquire(u8 *p, unsigned long old, unsigned long new) in __cmpxchg_u8_acquire() argument
[all …]
/linux/lib/
H A Derrseq.c61 errseq_t cur, old; in errseq_set() local
72 old = READ_ONCE(*eseq); in errseq_set()
76 return old; in errseq_set()
82 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set()
85 if (old & ERRSEQ_SEEN) in errseq_set()
89 if (new == old) { in errseq_set()
95 cur = cmpxchg(eseq, old, new); in errseq_set()
101 if (likely(cur == old || cur == new)) in errseq_set()
105 old = cur; in errseq_set()
125 errseq_t old = READ_ONCE(*eseq); in errseq_sample() local
[all …]
/linux/arch/sparc/kernel/
H A Dftrace.c26 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument
47 : [new] "0" (new), [old] "r" (old), [ip] "r" (ip) in ftrace_modify_code()
50 if (replaced != old && replaced != new) in ftrace_modify_code()
59 u32 old, new; in ftrace_make_nop() local
61 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
63 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
69 u32 old, new; in ftrace_make_call() local
71 old = ftrace_nop; in ftrace_make_call()
73 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
79 u32 old, new; in ftrace_update_ftrace_func() local
[all …]
/linux/security/safesetid/
H A Dlsm.c148 static bool id_permitted_for_cred(const struct cred *old, kid_t new_id, enum setid_type new_type) in id_permitted_for_cred() argument
154 if (uid_eq(new_id.uid, old->uid) || uid_eq(new_id.uid, old->euid) || in id_permitted_for_cred()
155 uid_eq(new_id.uid, old->suid)) in id_permitted_for_cred()
158 if (gid_eq(new_id.gid, old->gid) || gid_eq(new_id.gid, old->egid) || in id_permitted_for_cred()
159 gid_eq(new_id.gid, old->sgid)) in id_permitted_for_cred()
169 setid_policy_lookup((kid_t){.uid = old->uid}, new_id, new_type) != SIDPOL_CONSTRAINED; in id_permitted_for_cred()
174 __kuid_val(old->uid), __kuid_val(old->euid), in id_permitted_for_cred()
175 __kuid_val(old->suid), __kuid_val(new_id.uid)); in id_permitted_for_cred()
178 __kgid_val(old->gid), __kgid_val(old->egid), in id_permitted_for_cred()
179 __kgid_val(old->sgid), __kgid_val(new_id.gid)); in id_permitted_for_cred()
[all …]
/linux/include/linux/
H A Drefcount.h142 int old = refcount_read(r); in __refcount_add_not_zero() local
145 if (!old) in __refcount_add_not_zero()
147 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &old, old + i)); in __refcount_add_not_zero()
150 *oldp = old; in __refcount_add_not_zero()
152 if (unlikely(old < 0 || old + i < 0)) in __refcount_add_not_zero()
155 return old; in __refcount_add_not_zero()
184 int old = atomic_fetch_add_relaxed(i, &r->refs); in __refcount_add() local
187 *oldp = old; in __refcount_add()
189 if (unlikely(!old)) in __refcount_add()
191 else if (unlikely(old < 0 || old + i < 0)) in __refcount_add()
[all …]
/linux/kernel/
H A Dtracepoint.c109 static inline void release_probes(struct tracepoint *tp, struct tracepoint_func *old) in release_probes() argument
111 if (old) { in release_probes()
112 struct tp_probes *tp_probes = container_of(old, in release_probes()
137 struct tracepoint_func *old, *new; in func_add() local
146 old = *funcs; in func_add()
147 if (old) { in func_add()
149 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
150 if (old[iter_probes].func == tp_stub_func) in func_add()
152 if (old[iter_probes].func == tp_func->func && in func_add()
153 old[iter_probes].data == tp_func->data) in func_add()
[all …]
H A Dcred.c209 const struct cred *old; in prepare_creds() local
218 old = task->cred; in prepare_creds()
219 memcpy(new, old, sizeof(struct cred)); in prepare_creds()
242 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0) in prepare_creds()
383 * the old set. Both the objective and the subjective credentials pointers are
395 const struct cred *old = task->real_cred; in commit_creds() local
400 BUG_ON(task->cred != old); in commit_creds()
406 if (!uid_eq(old->euid, new->euid) || in commit_creds()
407 !gid_eq(old->egid, new->egid) || in commit_creds()
408 !uid_eq(old in commit_creds()
488 const struct cred *old = current->cred; override_creds() local
517 revert_creds(const struct cred * old) revert_creds() argument
631 const struct cred *old; prepare_kernel_cred() local
[all...]
/linux/drivers/input/joystick/iforce/
H A Diforce-ff.c178 struct ff_effect *old, in need_condition_modifier() argument
191 ret |= old->u.condition[i].right_saturation != new->u.condition[i].right_saturation in need_condition_modifier()
192 || old->u.condition[i].left_saturation != new->u.condition[i].left_saturation in need_condition_modifier()
193 || old->u.condition[i].right_coeff != new->u.condition[i].right_coeff in need_condition_modifier()
194 || old->u.condition[i].left_coeff != new->u.condition[i].left_coeff in need_condition_modifier()
195 || old->u.condition[i].deadband != new->u.condition[i].deadband in need_condition_modifier()
196 || old->u.condition[i].center != new->u.condition[i].center; in need_condition_modifier()
206 struct ff_effect *old, in need_magnitude_modifier() argument
215 return old->u.constant.level != effect->u.constant.level; in need_magnitude_modifier()
222 static int need_envelope_modifier(struct iforce *iforce, struct ff_effect *old, in need_envelope_modifier() argument
[all …]
/linux/arch/sh/kernel/
H A Dftrace.c102 int old = atomic_read(&nmi_running); in clear_mod_flag() local
105 int new = old & ~MOD_CODE_WRITE_FLAG; in clear_mod_flag()
107 if (old == new) in clear_mod_flag()
110 old = atomic_cmpxchg(&nmi_running, old, new); in clear_mod_flag()
225 unsigned char old[MCOUNT_INSN_SIZE], *new; in ftrace_update_ftrace_func() local
227 memcpy(old, (unsigned char *)ip, MCOUNT_INSN_SIZE); in ftrace_update_ftrace_func()
230 return ftrace_modify_code(ip, old, new); in ftrace_update_ftrace_func()
236 unsigned char *new, *old; in ftrace_make_nop() local
239 old = ftrace_call_replace(ip, addr); in ftrace_make_nop()
242 return ftrace_modify_code(rec->ip, old, new); in ftrace_make_nop()
[all …]
/linux/arch/sparc/include/asm/
H A Dcmpxchg_64.h11 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument
15 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32()
115 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
119 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64()
131 __cmpxchg_u8(volatile unsigned char *m, unsigned char old, unsigned char new) in __cmpxchg_u8() argument
142 old32 = (load32 & ~mask) | (old << bit_shift); in __cmpxchg_u8()
145 return old; in __cmpxchg_u8()
147 } while (load == old); in __cmpxchg_u8()
157 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
161 return __cmpxchg_u8(ptr, old, new); in __cmpxchg()
[all …]
H A Dcmpxchg_32.h41 u8 __cmpxchg_u8(volatile u8 *m, u8 old, u8 new_);
42 u16 __cmpxchg_u16(volatile u16 *m, u16 old, u16 new_);
43 u32 __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_);
47 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) in __cmpxchg() argument
50 size == 1 ? __cmpxchg_u8(ptr, old, new_) : in __cmpxchg()
51 size == 2 ? __cmpxchg_u16(ptr, old, new_) : in __cmpxchg()
52 size == 4 ? __cmpxchg_u32(ptr, old, new_) : in __cmpxchg()
53 (__cmpxchg_called_with_bad_pointer(), old); in __cmpxchg()
64 u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new);
65 #define arch_cmpxchg64(ptr, old, new) __cmpxchg_u64(ptr, old, new) argument
/linux/arch/s390/include/asm/
H A Dbitops.h88 unsigned long old; in arch_test_and_set_bit() local
90 old = __atomic64_or_barrier(mask, (long *)addr); in arch_test_and_set_bit()
91 return old & mask; in arch_test_and_set_bit()
99 unsigned long old; in arch_test_and_clear_bit() local
101 old = __atomic64_and_barrier(~mask, (long *)addr); in arch_test_and_clear_bit()
102 return old & mask; in arch_test_and_clear_bit()
110 unsigned long old; in arch_test_and_change_bit() local
112 old = __atomic64_xor_barrier(mask, (long *)addr); in arch_test_and_change_bit()
113 return old & mask; in arch_test_and_change_bit()
148 unsigned long old; in arch___test_and_set_bit() local
[all …]
/linux/arch/parisc/include/asm/
H A Dcmpxchg.h60 extern u8 __cmpxchg_u8(volatile u8 *ptr, u8 old, u8 new_);
61 extern u16 __cmpxchg_u16(volatile u16 *ptr, u16 old, u16 new_);
62 extern u32 __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_);
63 extern u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new_);
67 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) in __cmpxchg() argument
71 size == 8 ? __cmpxchg_u64(ptr, old, new_) : in __cmpxchg()
73 size == 4 ? __cmpxchg_u32(ptr, old, new_) : in __cmpxchg()
74 size == 2 ? __cmpxchg_u16(ptr, old, new_) : in __cmpxchg()
75 size == 1 ? __cmpxchg_u8(ptr, old, new_) : in __cmpxchg()
76 (__cmpxchg_called_with_bad_pointer(), old); in __cmpxchg()
[all …]
/linux/arch/arm64/kvm/hyp/
H A Dexception.c94 unsigned long sctlr, vbar, old, new, mode; in enter_exception64() local
126 old = *vcpu_cpsr(vcpu); in enter_exception64()
129 new |= (old & PSR_N_BIT); in enter_exception64()
130 new |= (old & PSR_Z_BIT); in enter_exception64()
131 new |= (old & PSR_C_BIT); in enter_exception64()
132 new |= (old & PSR_V_BIT); in enter_exception64()
137 new |= (old & PSR_DIT_BIT); in enter_exception64()
145 new |= (old & PSR_PAN_BIT); in enter_exception64()
171 __vcpu_write_spsr(vcpu, target_mode, old); in enter_exception64()
195 unsigned long old, new; in get_except32_cpsr() local
[all …]
/linux/include/asm-generic/bitops/
H A Dlock.h21 long old; in arch_test_and_set_bit_lock() local
28 old = raw_atomic_long_fetch_or_acquire(mask, (atomic_long_t *)p); in arch_test_and_set_bit_lock()
29 return !!(old & mask); in arch_test_and_set_bit_lock()
61 unsigned long old; in arch___clear_bit_unlock() local
64 old = READ_ONCE(*p); in arch___clear_bit_unlock()
65 old &= ~BIT_MASK(nr); in arch___clear_bit_unlock()
66 raw_atomic_long_set_release((atomic_long_t *)p, old); in arch___clear_bit_unlock()
73 long old; in arch_xor_unlock_is_negative_byte() local
75 old = raw_atomic_long_fetch_xor_release(mask, (atomic_long_t *)p); in arch_xor_unlock_is_negative_byte()
76 return !!(old & BIT(7)); in arch_xor_unlock_is_negative_byte()
/linux/arch/loongarch/include/asm/
H A Dcmpxchg.h95 #define __cmpxchg_asm(ld, st, m, old, new) \ argument
97 __typeof(old) __ret; \
108 : "ZB"(*m), "Jr" (old), "Jr" (new) \
114 static inline unsigned int __cmpxchg_small(volatile void *ptr, unsigned int old, in __cmpxchg_small() argument
123 old &= mask; in __cmpxchg_small()
133 old <<= shift; in __cmpxchg_small()
156 : "ZC" (*ptr32), "Jr" (mask), "Jr" (old), "Jr" (new) in __cmpxchg_small()
163 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, unsigned int size) in __cmpxchg() argument
168 return __cmpxchg_small(ptr, old, new, size); in __cmpxchg()
172 (u32)old, new); in __cmpxchg()
[all …]
/linux/arch/x86/include/asm/
H A 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 arch_cmpxchg(ptr, old, new) \ argument
149 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
[all …]
/linux/sound/soc/sof/
H A Dops.c19 unsigned int old, new; in snd_sof_pci_update_bits_unlocked() local
23 old = ret; in snd_sof_pci_update_bits_unlocked()
24 dev_dbg(sdev->dev, "Debug PCIR: %8.8x at %8.8x\n", old & mask, offset); in snd_sof_pci_update_bits_unlocked()
26 new = (old & ~mask) | (value & mask); in snd_sof_pci_update_bits_unlocked()
28 if (old == new) in snd_sof_pci_update_bits_unlocked()
54 unsigned int old, new; in snd_sof_dsp_update_bits_unlocked() local
59 old = ret; in snd_sof_dsp_update_bits_unlocked()
60 new = (old & ~mask) | (value & mask); in snd_sof_dsp_update_bits_unlocked()
62 if (old == new) in snd_sof_dsp_update_bits_unlocked()
74 u64 old, new; in snd_sof_dsp_update_bits64_unlocked() local
[all …]
/linux/arch/xtensa/include/asm/
H A Dcmpxchg.h25 __cmpxchg_u32(volatile int *p, int old, int new) in __cmpxchg_u32() argument
39 : [new] "a" (new), [addr] "a" (p), [cmp] "a" (old) in __cmpxchg_u32()
49 : [cmp] "a" (old) in __cmpxchg_u32()
63 : [old] "=&a" (old), [mem] "+m" (*p) in __cmpxchg_u32()
64 : [cmp] "a" (old), [new] "r" (new) in __cmpxchg_u32()
66 return old; in __cmpxchg_u32()
75 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) in __cmpxchg() argument
78 case 1: return cmpxchg_emu_u8(ptr, old, new); in __cmpxchg()
79 case 4: return __cmpxchg_u32(ptr, old, new); in __cmpxchg()
81 return old; in __cmpxchg()
[all …]
/linux/net/smc/
H A Dsmc_cdc.h150 union smc_host_cursor *old, in smc_curs_diff() argument
153 if (old->wrap != new->wrap) in smc_curs_diff()
155 ((size - old->count) + new->count)); in smc_curs_diff()
157 return max_t(int, 0, (new->count - old->count)); in smc_curs_diff()
164 union smc_host_cursor *old, in smc_curs_comp() argument
167 if (old->wrap > new->wrap || in smc_curs_comp()
168 (old->wrap == new->wrap && old->count > new->count)) in smc_curs_comp()
169 return -smc_curs_diff(size, new, old); in smc_curs_comp()
170 return smc_curs_diff(size, old, new); in smc_curs_comp()
177 union smc_host_cursor *old, in smc_curs_diff_large() argument
[all …]
/linux/drivers/hid/usbhid/
H A Dhid-pidff.c262 struct ff_envelope *old) in pidff_needs_set_envelope() argument
264 return envelope->attack_level != old->attack_level || in pidff_needs_set_envelope()
265 envelope->fade_level != old->fade_level || in pidff_needs_set_envelope()
266 envelope->attack_length != old->attack_length || in pidff_needs_set_envelope()
267 envelope->fade_length != old->fade_length; in pidff_needs_set_envelope()
289 struct ff_effect *old) in pidff_needs_set_constant() argument
291 return effect->u.constant.level != old->u.constant.level; in pidff_needs_set_constant()
324 struct ff_effect *old) in pidff_needs_set_effect() argument
326 return effect->replay.length != old->replay.length || in pidff_needs_set_effect()
327 effect->trigger.interval != old->trigger.interval || in pidff_needs_set_effect()
[all …]
/linux/arch/sparc/lib/
H A Datomic32.c83 int arch_atomic_cmpxchg(atomic_t *v, int old, int new) in arch_atomic_cmpxchg() argument
90 if (likely(ret == old)) in arch_atomic_cmpxchg()
125 unsigned long old, flags; in sp32___set_bit() local
128 old = *addr; in sp32___set_bit()
129 *addr = old | mask; in sp32___set_bit()
132 return old & mask; in sp32___set_bit()
138 unsigned long old, flags; in sp32___clear_bit() local
141 old = *addr; in sp32___clear_bit()
142 *addr = old & ~mask; in sp32___clear_bit()
145 return old & mask; in sp32___clear_bit()
[all …]
/linux/arch/alpha/include/asm/
H A Dcmpxchg.h117 ____cmpxchg_u8(volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg_u8() argument
137 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg_u8()
143 ____cmpxchg_u16(volatile short *m, unsigned short old, unsigned short new) in ____cmpxchg_u16() argument
163 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg_u16()
169 ____cmpxchg_u32(volatile int *m, int old, int new) in ____cmpxchg_u32() argument
185 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg_u32()
191 ____cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in ____cmpxchg_u64() argument
207 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg_u64()
217 ____cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, in ____cmpxchg() argument
221 size == 1 ? ____cmpxchg_u8(ptr, old, new) : in ____cmpxchg()
[all …]

12345678910>>...56