/kernel/linux/linux-5.10/arch/sh/include/asm/ |
D | bitops-cas.h | 5 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 …]
|
D | spinlock-cas.h | 13 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 …]
|
/kernel/linux/linux-5.10/arch/s390/include/asm/ |
D | atomic_ops.h | 16 op_type old; \ 19 op_string " %[old],%[val],%[ptr]\n" \ 21 : [old] "=d" (old), [ptr] "+Q" (*ptr) \ 23 return old; \ 67 int old, new; \ 70 "0: lr %[new],%[old]\n" \ 72 " cs %[old],%[new],%[ptr]\n" \ 74 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+Q" (*ptr)\ 76 return old; \ 93 long old, new; \ [all …]
|
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
D | bitops.h | 42 __u32 bit, old, new; in set_bit() local 50 old = *m; in set_bit() 51 new = old | bit; in set_bit() 52 } while (cmpxchg_acq(m, old, new) != old); in set_bit() 83 __u32 mask, old, new; in clear_bit() local 91 old = *m; in clear_bit() 92 new = old & mask; in clear_bit() 93 } while (cmpxchg_acq(m, old, new) != old); in clear_bit() 107 __u32 mask, old, new; in clear_bit_unlock() local 115 old = *m; in clear_bit_unlock() [all …]
|
D | atomic.h | 34 __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); \ 49 __s32 old, new; \ 54 old = atomic_read(v); \ 55 new = old c_op i; \ 56 } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic_t)) != old); \ 57 return old; \ 129 s64 old, new; \ [all …]
|
D | acenv.h | 22 unsigned int old, new, val; in ia64_acpi_acquire_global_lock() local 24 old = *lock; in ia64_acpi_acquire_global_lock() 25 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); in ia64_acpi_acquire_global_lock() 26 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_acquire_global_lock() 27 } while (unlikely (val != old)); in ia64_acpi_acquire_global_lock() 34 unsigned int old, new, val; in ia64_acpi_release_global_lock() local 36 old = *lock; in ia64_acpi_release_global_lock() 37 new = old & ~0x3; in ia64_acpi_release_global_lock() 38 val = ia64_cmpxchg4_acq(lock, new, old); in ia64_acpi_release_global_lock() 39 } while (unlikely (val != old)); in ia64_acpi_release_global_lock() [all …]
|
/kernel/linux/linux-5.10/arch/sparc/kernel/ |
D | ftrace.c | 26 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 …]
|
/kernel/linux/linux-5.10/security/safesetid/ |
D | lsm.c | 153 * Check whether a caller with old credentials @old is allowed to switch to 156 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 160 /* If our old creds already had this ID in it, it's fine. */ in id_permitted_for_cred() 162 if (uid_eq(new_id.uid, old->uid) || uid_eq(new_id.uid, old->euid) || in id_permitted_for_cred() 163 uid_eq(new_id.uid, old->suid)) in id_permitted_for_cred() 166 if (gid_eq(new_id.gid, old->gid) || gid_eq(new_id.gid, old->egid) || in id_permitted_for_cred() 167 gid_eq(new_id.gid, old->sgid)) in id_permitted_for_cred() 173 * Transitions to new UIDs require a check against the policy of the old in id_permitted_for_cred() 177 setid_policy_lookup((kid_t){.uid = old->uid}, new_id, new_type) != SIDPOL_CONSTRAINED; in id_permitted_for_cred() 182 __kuid_val(old->uid), __kuid_val(old->euid), in id_permitted_for_cred() [all …]
|
/kernel/linux/linux-5.10/drivers/input/joystick/iforce/ |
D | iforce-ff.c | 182 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 …]
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
D | cmpxchg.h | 42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ 49 old <<= bitoff; \ 67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \ 202 * Compare and exchange - if *p == old, set it to new, 203 * and return the old value of *p. 216 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument 231 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32() 238 __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, in __cmpxchg_u32_local() argument 252 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local() 259 __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new) in __cmpxchg_u32_relaxed() argument [all …]
|
/kernel/linux/linux-5.10/arch/arm/kernel/ |
D | ftrace.c | 77 static int ftrace_modify_code(unsigned long pc, unsigned long old, in ftrace_modify_code() argument 83 old = __opcode_to_mem_thumb32(old); in ftrace_modify_code() 85 old = __opcode_to_mem_arm(old); in ftrace_modify_code() 92 if (replaced != old) in ftrace_modify_code() 126 unsigned long new, old; in ftrace_make_call() local 135 old = ftrace_nop_replace(rec); in ftrace_make_call() 145 return ftrace_modify_code(rec->ip, old, new, true); in ftrace_make_call() 153 unsigned long new, old; in ftrace_modify_call() local 156 old = ftrace_call_replace(ip, adjust_address(rec, old_addr), true); in ftrace_modify_call() 160 return ftrace_modify_code(rec->ip, old, new, true); in ftrace_modify_call() [all …]
|
/kernel/linux/linux-5.10/kernel/ |
D | tracepoint.c | 142 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 192 old = *funcs; in func_add() 193 if (old) { in func_add() 195 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add() 197 if (pos < 0 && old[nr_probes].prio < prio) in func_add() 199 if (old[nr_probes].func == tp_func->func && in func_add() 200 old[nr_probes].data == tp_func->data) in func_add() [all …]
|
D | cred.c | 253 const struct cred *old; in prepare_creds() local 264 old = task->cred; in prepare_creds() 265 memcpy(new, old, sizeof(struct cred)); in prepare_creds() 285 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0) in prepare_creds() 428 * the old set. Both the objective and the subjective credentials pointers are 440 const struct cred *old = task->real_cred; in commit_creds() local 446 BUG_ON(task->cred != old); in commit_creds() 448 BUG_ON(read_cred_subscribers(old) < 2); in commit_creds() 449 validate_creds(old); in commit_creds() 457 if (!uid_eq(old->euid, new->euid) || in commit_creds() [all …]
|
/kernel/linux/linux-5.10/arch/s390/lib/ |
D | spinlock.c | 84 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 …]
|
/kernel/linux/linux-5.10/net/smc/ |
D | smc_cdc.h | 146 /* 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 …]
|
/kernel/linux/linux-5.10/arch/x86/include/asm/ |
D | atomic64_32.h | 71 * the old value. 86 * the old value. 274 s64 old, c = 0; in arch_atomic64_and() local 276 while ((old = arch_atomic64_cmpxchg(v, c, c & i)) != c) in arch_atomic64_and() 277 c = old; in arch_atomic64_and() 282 s64 old, c = 0; in arch_atomic64_fetch_and() local 284 while ((old = arch_atomic64_cmpxchg(v, c, c & i)) != c) in arch_atomic64_fetch_and() 285 c = old; in arch_atomic64_fetch_and() 287 return old; in arch_atomic64_fetch_and() 293 s64 old, c = 0; in arch_atomic64_or() local [all …]
|
D | cmpxchg.h | 40 * 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 …]
|
/kernel/linux/linux-5.10/arch/alpha/include/asm/ |
D | atomic.h | 201 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument 204 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS() argument 214 * Returns the old value of @v. in ATOMIC_OPS() 218 int c, new, old; in ATOMIC_OPS() local 221 "1: ldl_l %[old],%[mem]\n" in ATOMIC_OPS() 222 " cmpeq %[old],%[u],%[c]\n" in ATOMIC_OPS() 223 " addl %[old],%[a],%[new]\n" in ATOMIC_OPS() 231 : [old] "=&r"(old), [new] "=&r"(new), [c] "=&r"(c) in ATOMIC_OPS() 235 return old; in ATOMIC_OPS() 246 * Returns the old value of @v. [all …]
|
/kernel/linux/linux-5.10/arch/sparc/lib/ |
D | atomic32.c | 83 int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument 90 if (likely(ret == old)) in atomic_cmpxchg() 125 unsigned long old, flags; in ___set_bit() local 128 old = *addr; in ___set_bit() 129 *addr = old | mask; in ___set_bit() 132 return old & mask; in ___set_bit() 138 unsigned long old, flags; in ___clear_bit() local 141 old = *addr; in ___clear_bit() 142 *addr = old & ~mask; in ___clear_bit() 145 return old & mask; in ___clear_bit() [all …]
|
/kernel/linux/linux-5.10/arch/sparc/include/asm/ |
D | cmpxchg_64.h | 11 __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 …]
|
/kernel/linux/linux-5.10/sound/soc/sof/ |
D | ops.c | 19 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 …]
|
/kernel/linux/linux-5.10/arch/s390/mm/ |
D | pgtable.c | 91 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 …]
|
/kernel/linux/linux-5.10/lib/ |
D | lockref.c | 8 * Note that the "cmpxchg()" reloads the "old" value for the 13 struct lockref old; \ 14 BUILD_BUG_ON(sizeof(old) != 8); \ 15 old.lock_count = READ_ONCE(lockref->lock_count); \ 16 while (likely(arch_spin_value_unlocked(old.lock.rlock.raw_lock))) { \ 17 struct lockref new = old, prev = old; \ 19 old.lock_count = cmpxchg64_relaxed(&lockref->lock_count, \ 20 old.lock_count, \ 22 if (likely(old.lock_count == prev.lock_count)) { \ 69 if (old.count <= 0) in lockref_get_not_zero() [all …]
|
D | errseq.c | 60 errseq_t cur, old; in errseq_set() local 71 old = READ_ONCE(*eseq); in errseq_set() 75 return old; in errseq_set() 81 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set() 84 if (old & ERRSEQ_SEEN) in errseq_set() 88 if (new == old) { in errseq_set() 94 cur = cmpxchg(eseq, old, new); in errseq_set() 100 if (likely(cur == old || cur == new)) in errseq_set() 104 old = cur; in errseq_set() 115 * If the error has been "seen", new callers will not see an old error. [all …]
|
/kernel/linux/linux-5.10/include/asm-generic/bitops/ |
D | lock.h | 10 * test_and_set_bit_lock - Set a bit and return its old value, for lock 21 long old; in test_and_set_bit_lock() local 28 old = atomic_long_fetch_or_acquire(mask, (atomic_long_t *)p); in test_and_set_bit_lock() 29 return !!(old & mask); in test_and_set_bit_lock() 60 unsigned long old; in __clear_bit_unlock() local 63 old = READ_ONCE(*p); in __clear_bit_unlock() 64 old &= ~BIT_MASK(nr); in __clear_bit_unlock() 65 atomic_long_set_release((atomic_long_t *)p, old); in __clear_bit_unlock() 81 long old; in clear_bit_unlock_is_negative_byte() local 85 old = atomic_long_fetch_andnot_release(mask, (atomic_long_t *)p); in clear_bit_unlock_is_negative_byte() [all …]
|