Home
last modified time | relevance | path

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

12345678910

/linux-4.19.296/lib/
Derrseq.c60 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()
124 errseq_t old = READ_ONCE(*eseq); in errseq_sample() local
[all …]
Dlockref.c12 struct lockref old; \
13 BUILD_BUG_ON(sizeof(old) != 8); \
14 old.lock_count = READ_ONCE(lockref->lock_count); \
15 while (likely(arch_spin_value_unlocked(old.lock.rlock.raw_lock))) { \
16 struct lockref new = old, prev = old; \
18 old.lock_count = cmpxchg64_relaxed(&lockref->lock_count, \
19 old.lock_count, \
21 if (likely(old.lock_count == prev.lock_count)) { \
66 if (old.count <= 0) in lockref_get_not_zero()
94 if (old.count <= 1) in lockref_put_not_zero()
[all …]
Ddump_stack.c92 int old; in dump_stack() local
102 old = atomic_cmpxchg(&dump_lock, -1, cpu); in dump_stack()
103 if (old == -1) { in dump_stack()
105 } else if (old == cpu) { in dump_stack()
/linux-4.19.296/include/asm-generic/bitops/
Dlock.h21 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()
86 return !!(old & BIT(7)); in clear_bit_unlock_is_negative_byte()
Datomic.h34 long old; in test_and_set_bit() local
38 old = atomic_long_fetch_or(mask, (atomic_long_t *)p); in test_and_set_bit()
39 return !!(old & mask); in test_and_set_bit()
44 long old; in test_and_clear_bit() local
48 old = atomic_long_fetch_andnot(mask, (atomic_long_t *)p); in test_and_clear_bit()
49 return !!(old & mask); in test_and_clear_bit()
54 long old; in test_and_change_bit() local
58 old = atomic_long_fetch_xor(mask, (atomic_long_t *)p); in test_and_change_bit()
59 return !!(old & mask); in test_and_change_bit()
Dnon-atomic.h62 unsigned long old = *p; in __test_and_set_bit() local
64 *p = old | mask; in __test_and_set_bit()
65 return (old & mask) != 0; in __test_and_set_bit()
81 unsigned long old = *p; in __test_and_clear_bit() local
83 *p = old & ~mask; in __test_and_clear_bit()
84 return (old & mask) != 0; in __test_and_clear_bit()
93 unsigned long old = *p; in __test_and_change_bit() local
95 *p = old ^ mask; in __test_and_change_bit()
96 return (old & mask) != 0; in __test_and_change_bit()
/linux-4.19.296/include/linux/
Diversion.h176 u64 cur, old, new; in inode_maybe_inc_iversion() local
198 old = atomic64_cmpxchg(&inode->i_version, cur, new); in inode_maybe_inc_iversion()
199 if (likely(old == cur)) in inode_maybe_inc_iversion()
201 cur = old; in inode_maybe_inc_iversion()
283 u64 cur, old, new; in inode_query_iversion() local
299 old = atomic64_cmpxchg(&inode->i_version, cur, new); in inode_query_iversion()
300 if (likely(old == cur)) in inode_query_iversion()
302 cur = old; in inode_query_iversion()
316 inode_eq_iversion_raw(const struct inode *inode, u64 old) in inode_eq_iversion_raw() argument
318 return inode_peek_iversion_raw(inode) == old; in inode_eq_iversion_raw()
[all …]
Drbtree_augmented.h41 void (*copy)(struct rb_node *old, struct rb_node *new);
42 void (*rotate)(struct rb_node *old, struct rb_node *new);
48 void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
92 rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
94 new->rbaugmented = old->rbaugmented; \
99 rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
101 new->rbaugmented = old->rbaugmented; \
102 old->rbaugmented = rbcompute(old); \
135 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument
139 if (parent->rb_left == old) in __rb_change_child()
[all …]
Dbitops.h258 typeof(*ptr) old, new; \
261 old = READ_ONCE(*ptr); \
262 new = old & ~clear; \
263 } while (!(old & test) && \
264 cmpxchg(ptr, old, new) != old); \
266 !(old & test); \
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()
/linux-4.19.296/virt/kvm/arm/
Daarch32.c88 unsigned long old, new; in get_except32_cpsr() local
90 old = *vcpu_cpsr(vcpu); in get_except32_cpsr()
93 new |= (old & PSR_AA32_N_BIT); in get_except32_cpsr()
94 new |= (old & PSR_AA32_Z_BIT); in get_except32_cpsr()
95 new |= (old & PSR_AA32_C_BIT); in get_except32_cpsr()
96 new |= (old & PSR_AA32_V_BIT); in get_except32_cpsr()
97 new |= (old & PSR_AA32_Q_BIT); in get_except32_cpsr()
103 new |= (old & PSR_AA32_DIT_BIT); in get_except32_cpsr()
113 new |= (old & PSR_AA32_PAN_BIT); in get_except32_cpsr()
122 new |= (old & PSR_AA32_GE_MASK); in get_except32_cpsr()
[all …]
/linux-4.19.296/drivers/dma-buf/
Dreservation.c71 struct reservation_object_list *fobj, *old; in reservation_object_reserve_shared() local
74 old = reservation_object_get_list(obj); in reservation_object_reserve_shared()
76 if (old && old->shared_max) { in reservation_object_reserve_shared()
77 if (old->shared_count < old->shared_max) { in reservation_object_reserve_shared()
83 max = old->shared_max * 2; in reservation_object_reserve_shared()
157 struct reservation_object_list *old, in reservation_object_add_shared_replace() argument
165 if (!old) { in reservation_object_add_shared_replace()
177 for (i = 0, j = 0, k = fobj->shared_max; i < old->shared_count; ++i) { in reservation_object_add_shared_replace()
180 check = rcu_dereference_protected(old->shared[i], in reservation_object_add_shared_replace()
204 if (!old) in reservation_object_add_shared_replace()
[all …]
/linux-4.19.296/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 …]
/linux-4.19.296/include/asm-generic/
Datomic.h43 int c, old; \
46 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
47 c = old; \
53 int c, old; \
56 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
57 c = old; \
65 int c, old; \
68 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
69 c = old; \
200 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) argument
Dcmpxchg-local.h16 unsigned long old, unsigned long new, int size) in __cmpxchg_local_generic() argument
29 if (prev == old) in __cmpxchg_local_generic()
33 if (prev == old) in __cmpxchg_local_generic()
37 if (prev == old) in __cmpxchg_local_generic()
41 if (prev == old) in __cmpxchg_local_generic()
55 u64 old, u64 new) in __cmpxchg64_local_generic() argument
62 if (prev == old) in __cmpxchg64_local_generic()
Datomic-instrumented.h55 static __always_inline int atomic_cmpxchg(atomic_t *v, int old, int new) in atomic_cmpxchg() argument
58 return arch_atomic_cmpxchg(v, old, new); in atomic_cmpxchg()
61 static __always_inline s64 atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new) in atomic64_cmpxchg() argument
64 return arch_atomic64_cmpxchg(v, old, new); in atomic64_cmpxchg()
69 static __always_inline bool atomic_try_cmpxchg(atomic_t *v, int *old, int new) in atomic_try_cmpxchg() argument
72 kasan_check_read(old, sizeof(*old)); in atomic_try_cmpxchg()
73 return arch_atomic_try_cmpxchg(v, old, new); in atomic_try_cmpxchg()
79 static __always_inline bool atomic64_try_cmpxchg(atomic64_t *v, s64 *old, s64 new) in atomic64_try_cmpxchg() argument
82 kasan_check_read(old, sizeof(*old)); in atomic64_try_cmpxchg()
83 return arch_atomic64_try_cmpxchg(v, old, new); in atomic64_try_cmpxchg()
[all …]
Datomic-long.h83 #define atomic_long_cmpxchg_relaxed(l, old, new) \ argument
85 (old), (new)))
86 #define atomic_long_cmpxchg_acquire(l, old, new) \ argument
88 (old), (new)))
89 #define atomic_long_cmpxchg_release(l, old, new) \ argument
91 (old), (new)))
92 #define atomic_long_cmpxchg(l, old, new) \ argument
93 (ATOMIC_LONG_PFX(_cmpxchg)((ATOMIC_LONG_PFX(_t) *)(l), (old), (new)))
96 #define atomic_long_try_cmpxchg_relaxed(l, old, new) \ argument
98 (ATOMIC_LONG_TYPE *)(old), (ATOMIC_LONG_TYPE)(new)))
[all …]
/linux-4.19.296/fs/afs/
Dserver_list.c106 struct afs_server_list *old) in afs_annotate_server_list() argument
111 if (old->nr_servers != new->nr_servers) in afs_annotate_server_list()
114 for (i = 0; i < old->nr_servers; i++) in afs_annotate_server_list()
115 if (old->servers[i].server != new->servers[i].server) in afs_annotate_server_list()
122 cur = old->servers[old->index].server; in afs_annotate_server_list()
135 while (i < old->nr_servers && j < new->nr_servers) { in afs_annotate_server_list()
136 if (new->servers[j].server == old->servers[i].server) { in afs_annotate_server_list()
137 struct afs_cb_interest *cbi = old->servers[i].cb_interest; in afs_annotate_server_list()
147 if (new->servers[j].server < old->servers[i].server) { in afs_annotate_server_list()
/linux-4.19.296/fs/
Dfs_struct.c49 static inline int replace_path(struct path *p, const struct path *old, const struct path *new) in replace_path() argument
51 if (likely(p->dentry != old->dentry || p->mnt != old->mnt)) in replace_path()
111 struct fs_struct *copy_fs_struct(struct fs_struct *old) in copy_fs_struct() argument
120 fs->umask = old->umask; in copy_fs_struct()
122 spin_lock(&old->lock); in copy_fs_struct()
123 fs->root = old->root; in copy_fs_struct()
125 fs->pwd = old->pwd; in copy_fs_struct()
127 spin_unlock(&old->lock); in copy_fs_struct()
/linux-4.19.296/fs/overlayfs/
Ddir.c682 static int ovl_link(struct dentry *old, struct inode *newdir, in ovl_link() argument
689 err = ovl_want_write(old); in ovl_link()
693 err = ovl_copy_up(old); in ovl_link()
701 if (ovl_is_metacopy_dentry(old)) { in ovl_link()
702 err = ovl_set_link_redirect(old); in ovl_link()
707 err = ovl_nlink_start(old, &locked); in ovl_link()
711 inode = d_inode(old); in ovl_link()
715 &(struct ovl_cattr) {.hardlink = ovl_dentry_upper(old)}, in ovl_link()
716 ovl_type_origin(old)); in ovl_link()
720 ovl_nlink_end(old, locked); in ovl_link()
[all …]
/linux-4.19.296/include/trace/events/
Dfilemap.h83 TP_PROTO(struct file *file, errseq_t old),
85 TP_ARGS(file, old),
91 __field(errseq_t, old)
104 __entry->old = old;
110 MINOR(__entry->s_dev), __entry->i_ino, __entry->old,
/linux-4.19.296/drivers/xen/events/
Devents_fifo.c229 event_word_t new, old, w; in clear_masked_cond() local
237 old = w & ~(1 << EVTCHN_FIFO_BUSY); in clear_masked_cond()
238 new = old & ~(1 << EVTCHN_FIFO_MASKED); in clear_masked_cond()
239 w = sync_cmpxchg(word, old, new); in clear_masked_cond()
240 } while (w != old); in clear_masked_cond()
259 event_word_t new, old, w; in clear_linked() local
264 old = w; in clear_linked()
267 } while ((w = sync_cmpxchg(word, old, new)) != old); in clear_linked()
/linux-4.19.296/drivers/s390/scsi/
Dzfcp_scsi.c527 struct fsf_qtcb_bottom_port *old) in zfcp_scsi_adjust_fc_host_stats() argument
530 data->seconds_since_last_reset - old->seconds_since_last_reset; in zfcp_scsi_adjust_fc_host_stats()
531 fc_stats->tx_frames = data->tx_frames - old->tx_frames; in zfcp_scsi_adjust_fc_host_stats()
532 fc_stats->tx_words = data->tx_words - old->tx_words; in zfcp_scsi_adjust_fc_host_stats()
533 fc_stats->rx_frames = data->rx_frames - old->rx_frames; in zfcp_scsi_adjust_fc_host_stats()
534 fc_stats->rx_words = data->rx_words - old->rx_words; in zfcp_scsi_adjust_fc_host_stats()
535 fc_stats->lip_count = data->lip - old->lip; in zfcp_scsi_adjust_fc_host_stats()
536 fc_stats->nos_count = data->nos - old->nos; in zfcp_scsi_adjust_fc_host_stats()
537 fc_stats->error_frames = data->error_frames - old->error_frames; in zfcp_scsi_adjust_fc_host_stats()
538 fc_stats->dumped_frames = data->dumped_frames - old->dumped_frames; in zfcp_scsi_adjust_fc_host_stats()
[all …]
/linux-4.19.296/block/
Dblk-iolatency.c267 unsigned long old = atomic_read(&lat_info->scale_cookie); in scale_cookie_change() local
271 if (old < DEFAULT_SCALE_COOKIE) in scale_cookie_change()
272 diff = DEFAULT_SCALE_COOKIE - old; in scale_cookie_change()
275 if (scale + old > DEFAULT_SCALE_COOKIE) in scale_cookie_change()
307 unsigned long old = iolat->rq_depth.max_depth; in scale_change() local
310 if (old > qd) in scale_change()
311 old = qd; in scale_change()
314 if (old == 1 && blkcg_unuse_delay(lat_to_blkg(iolat))) in scale_change()
317 if (old < qd) { in scale_change()
319 old += scale; in scale_change()
[all …]
/linux-4.19.296/fs/ext4/
Dnamei.c1303 struct dx_entry *old = frame->at, *new = old + 1; in dx_insert_block() local
1307 assert(old < entries + count); in dx_insert_block()
3513 struct ext4_renament old = *ent; in ext4_resetent() local
3521 old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, in ext4_resetent()
3522 &old.inlined); in ext4_resetent()
3523 if (IS_ERR(old.bh)) in ext4_resetent()
3524 retval = PTR_ERR(old.bh); in ext4_resetent()
3525 if (!old.bh) in ext4_resetent()
3528 ext4_std_error(old.dir->i_sb, retval); in ext4_resetent()
3532 ext4_setent(handle, &old, ino, file_type); in ext4_resetent()
[all …]

12345678910