Home
last modified time | relevance | path

Searched full:old (Results 1 – 25 of 4288) sorted by relevance

12345678910>>...172

/linux-6.12.1/arch/sh/include/asm/
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 …]
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-6.12.1/arch/s390/include/asm/
Datomic_ops.h65 op_type old; \
68 op_string " %[old],%[val],%[ptr]\n" \
70 : [old] "=d" (old), [ptr] "+QS" (*ptr) \
72 return old; \
116 int old, new; \
119 "0: lr %[new],%[old]\n" \
121 " cs %[old],%[new],%[ptr]\n" \
123 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+Q" (*ptr)\
125 return old; \
142 long old, new; \
[all …]
Dcmpxchg.h20 unsigned long old; in __arch_xchg() local
34 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg()
37 return old >> shift; in __arch_xchg()
48 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg()
51 return old >> shift; in __arch_xchg()
57 : "=&d" (old), "+Q" (*(int *) address) in __arch_xchg()
60 return old; in __arch_xchg()
66 : "=&d" (old), "+QS" (*(long *) address) in __arch_xchg()
69 return old; in __arch_xchg()
88 unsigned long old, in __cmpxchg() argument
[all …]
/linux-6.12.1/security/safesetid/
Dlsm.c145 * Check whether a caller with old credentials @old is allowed to switch to
148 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
152 /* If our old creds already had this ID in it, it's fine. */ in id_permitted_for_cred()
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()
165 * Transitions to new UIDs require a check against the policy of the old 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()
[all …]
/linux-6.12.1/arch/powerpc/include/asm/
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) \
269 * Compare and exchange - if *p == old, set it to new,
270 * and return the old value of *p.
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
[all …]
/linux-6.12.1/arch/sparc/kernel/
Dftrace.c26 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument
32 "1: cas [%[ip]], %[old], %[new]\n" in ftrace_modify_code()
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()
[all …]
/linux-6.12.1/drivers/input/joystick/iforce/
Diforce-ff.c182 struct ff_effect *old, in need_condition_modifier() argument
195 ret |= old->u.condition[i].right_saturation != new->u.condition[i].right_saturation in need_condition_modifier()
196 || old->u.condition[i].left_saturation != new->u.condition[i].left_saturation in need_condition_modifier()
197 || old->u.condition[i].right_coeff != new->u.condition[i].right_coeff in need_condition_modifier()
198 || old->u.condition[i].left_coeff != new->u.condition[i].left_coeff in need_condition_modifier()
199 || old->u.condition[i].deadband != new->u.condition[i].deadband in need_condition_modifier()
200 || old->u.condition[i].center != new->u.condition[i].center; in need_condition_modifier()
210 struct ff_effect *old, in need_magnitude_modifier() argument
219 return old->u.constant.level != effect->u.constant.level; in need_magnitude_modifier()
226 static int need_envelope_modifier(struct iforce *iforce, struct ff_effect *old, in need_envelope_modifier() argument
[all …]
/linux-6.12.1/arch/s390/lib/
Dspinlock.c84 static inline int arch_cmpxchg_niai8(int *lock, int old, int new) in arch_cmpxchg_niai8() argument
86 int expected = old; in arch_cmpxchg_niai8()
91 : "=d" (old), "=Q" (*lock) in arch_cmpxchg_niai8()
92 : "0" (old), "d" (new), "Q" (*lock) in arch_cmpxchg_niai8()
94 return expected == old; in arch_cmpxchg_niai8()
120 int lockval, ix, node_id, tail_id, old, new, owner, count; in arch_spin_lock_queued() local
131 old = READ_ONCE(lp->lock); in arch_spin_lock_queued()
132 if ((old & _Q_LOCK_CPU_MASK) == 0 && in arch_spin_lock_queued()
133 (old & _Q_LOCK_STEAL_MASK) != _Q_LOCK_STEAL_MASK) { in arch_spin_lock_queued()
141 new = (old ? (old + _Q_LOCK_STEAL_ADD) : 0) | lockval; in arch_spin_lock_queued()
[all …]
/linux-6.12.1/net/smc/
Dsmc_cdc.h146 /* calculate cursor difference between old and new, where old <= new and
150 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()
160 /* calculate cursor difference between old and new - returns negative
161 * value in case old > new
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()
[all …]
/linux-6.12.1/kernel/
Dtracepoint.c142 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
144 if (old) { in release_probes()
145 struct tp_probes *tp_probes = container_of(old, in release_probes()
183 struct tracepoint_func *old, *new; in func_add() local
184 int iter_probes; /* Iterate over old probe array. */ in func_add()
192 old = *funcs; in func_add()
193 if (old) { in func_add()
195 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
196 if (old[iter_probes].func == tp_stub_func) in func_add()
198 if (old[iter_probes].func == tp_func->func && in func_add()
[all …]
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->fsuid, new->fsuid) || in commit_creds()
[all …]
/linux-6.12.1/arch/arm/kernel/
Dftrace.c98 static int ftrace_modify_code(unsigned long pc, unsigned long old, in ftrace_modify_code() argument
104 old = __opcode_to_mem_thumb32(old); in ftrace_modify_code()
106 old = __opcode_to_mem_arm(old); in ftrace_modify_code()
113 if (replaced != old) in ftrace_modify_code()
147 unsigned long new, old; in ftrace_make_call() local
156 old = ftrace_nop_replace(rec); in ftrace_make_call()
166 return ftrace_modify_code(rec->ip, old, new, true); in ftrace_make_call()
174 unsigned long new, old; in ftrace_modify_call() local
177 old = ftrace_call_replace(ip, adjust_address(rec, old_addr), true); in ftrace_modify_call()
181 return ftrace_modify_code(rec->ip, old, new, true); in ftrace_modify_call()
[all …]
/linux-6.12.1/arch/sparc/include/asm/
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()
78 /* Read the old value */ in xchg16()
106 * Atomic compare and exchange. Compare OLD with MEM, if identical,
108 * indicated by comparing RETURN with OLD.
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()
[all …]
/linux-6.12.1/Documentation/
Datomic_t.txt279 int atomic_cmpxchg(atomic_t *ptr, int old, int new);
287 int ret, old = *oldp;
288 ret = atomic_cmpxchg(ptr, old, new);
289 if (ret != old)
291 return ret == old;
296 int atomic_cmpxchg(atomic_t *ptr, int old, int new)
298 (void)atomic_try_cmpxchg(ptr, &old, new);
299 return old;
304 old = atomic_read(&v); old = atomic_read(&v);
306 new = func(old); new = func(old);
[all …]
/linux-6.12.1/arch/sparc/lib/
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-6.12.1/sound/soc/sof/
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-6.12.1/lib/
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()
116 * If the error has been "seen", new callers will not see an old error.
[all …]
/linux-6.12.1/arch/alpha/include/asm/
Datomic.h205 int c, new, old; in ATOMIC_OPS() local
208 "1: ldl_l %[old],%[mem]\n" in ATOMIC_OPS()
209 " cmpeq %[old],%[u],%[c]\n" in ATOMIC_OPS()
210 " addl %[old],%[a],%[new]\n" in ATOMIC_OPS()
218 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS()
222 return old; in ATOMIC_OPS()
228 s64 c, new, old; in arch_atomic64_fetch_add_unless() local
231 "1: ldq_l %[old],%[mem]\n" in arch_atomic64_fetch_add_unless()
232 " cmpeq %[old],%[u],%[c]\n" in arch_atomic64_fetch_add_unless()
233 " addq %[old],%[a],%[new]\n" in arch_atomic64_fetch_add_unless()
[all …]
/linux-6.12.1/arch/x86/include/asm/
Dcmpxchg.h40 * returns the old value.
81 * Atomic compare and exchange. Compare OLD with MEM, if identical,
83 * indicated by comparing RETURN with OLD.
85 #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
[all …]
/linux-6.12.1/include/asm-generic/bitops/
Dlock.h10 * arch_test_and_set_bit_lock - Set a bit and return its old value, for lock
21 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()
[all …]
/linux-6.12.1/arch/s390/mm/
Dpgtable.c91 pte_t old; in ptep_flush_direct() local
93 old = *ptep; in ptep_flush_direct()
94 if (unlikely(pte_val(old) & _PAGE_INVALID)) in ptep_flush_direct()
95 return old; in ptep_flush_direct()
103 return old; in ptep_flush_direct()
110 pte_t old; in ptep_flush_lazy() local
112 old = *ptep; in ptep_flush_lazy()
113 if (unlikely(pte_val(old) & _PAGE_INVALID)) in ptep_flush_lazy()
114 return old; in ptep_flush_lazy()
123 return old; in ptep_flush_lazy()
[all …]
/linux-6.12.1/drivers/hid/usbhid/
Dhid-pidff.c259 * Test if the new envelope differs from old one
262 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()
[all …]
/linux-6.12.1/arch/parisc/include/asm/
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-6.12.1/arch/xtensa/include/asm/
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()
57 " l32i %[old], %[mem]\n" in __cmpxchg_u32()
58 " bne %[old], %[cmp], 1f\n" 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()
[all …]

12345678910>>...172