Home
last modified time | relevance | path

Searched refs:cmpxchg (Results 1 – 174 of 174) sorted by relevance

/linux-4.1.27/net/ipv4/
Dprotocol.c43 return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_add_protocol()
50 return !cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_add_offload()
59 ret = (cmpxchg((const struct net_protocol **)&inet_protos[protocol], in inet_del_protocol()
72 ret = (cmpxchg((const struct net_offload **)&inet_offloads[protocol], in inet_del_offload()
Dgre_demux.c41 return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? in gre_add_protocol()
53 ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? in gre_del_protocol()
315 return (cmpxchg(proto, NULL, newp) == NULL) ? 0 : -EBUSY; in gre_cisco_register()
325 ret = (cmpxchg(proto, del_proto, NULL) == del_proto) ? 0 : -EINVAL; in gre_cisco_unregister()
Dip_tunnel.c519 return !cmpxchg((const struct ip_tunnel_encap_ops **) in ip_tunnel_encap_add_ops()
533 ret = (cmpxchg((const struct ip_tunnel_encap_ops **) in ip_tunnel_encap_del_ops()
Droute.c479 if (old != now && cmpxchg(&bucket->stamp32, old, now) == old) in ip_idents_reserve()
1322 prev = cmpxchg(p, orig, rt); in rt_cache_route()
Dtcp_output.c807 } while (cmpxchg(&tp->tsq_flags, flags, nflags) != flags); in tcp_release_cb()
/linux-4.1.27/net/ipv6/
Dprotocol.c34 return !cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_add_protocol()
43 ret = (cmpxchg((const struct inet6_protocol **)&inet6_protos[protocol], in inet6_del_protocol()
58 return !cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_add_offload()
67 ret = (cmpxchg((const struct net_offload **)&inet6_offloads[protocol], in inet6_del_offload()
Dip6_icmp.c15 return (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, NULL, fn) == NULL) ? in inet6_register_icmp_sender()
24 ret = (cmpxchg((ip6_icmp_send_t **)&ip6_icmp_send, fn, NULL) == fn) ? in inet6_unregister_icmp_sender()
Droute.c157 prev = cmpxchg(&dst->_metrics, old, new); in ipv6_cow_metrics()
/linux-4.1.27/arch/s390/include/asm/
Dcmpxchg.h14 #define cmpxchg(ptr, o, n) \ macro
21 #define cmpxchg64 cmpxchg
22 #define cmpxchg_local cmpxchg
23 #define cmpxchg64_local cmpxchg
Dpercpu.h37 prev__ = cmpxchg(ptr__, old__, new__); \
140 ret__ = cmpxchg(ptr__, oval, nval); \
/linux-4.1.27/kernel/
Dtask_work.c34 } while (cmpxchg(&task->task_works, head, work) != head); in task_work_add()
69 else if (cmpxchg(pprev, work, work->next) == work) in task_work_cancel()
99 } while (cmpxchg(&task->task_works, work, head) != work); in task_work_run()
Dirq_work.c40 oflags = cmpxchg(&work->flags, flags, nflags); in irq_work_claim()
161 (void)cmpxchg(&work->flags, flags, flags & ~IRQ_WORK_BUSY); in irq_work_run_list()
Dwatchdog.c809 } while (cmpxchg(&watchdog_enabled, old, new) != old); in proc_watchdog_common()
Dacct.c174 cmpxchg(&acct->ns->bacct, pin, NULL); in acct_pin_kill()
Dpid.c150 last_write = cmpxchg(&pid_ns->last_pid, prev, pid); in set_last_pid()
Dexit.c1010 if (cmpxchg(&p->exit_state, EXIT_ZOMBIE, state) != EXIT_ZOMBIE) in wait_task_zombie()
/linux-4.1.27/arch/tile/include/asm/
Dcmpxchg.h51 #define cmpxchg(ptr, o, n) \ macro
102 #define cmpxchg(ptr, o, n) \ macro
126 #define cmpxchg64 cmpxchg
Dbitops_64.h43 oldval = cmpxchg(addr, guess, guess ^ mask); in change_bit()
88 oldval = cmpxchg(addr, guess, guess ^ mask); in test_and_change_bit()
Datomic_64.h56 oldval = cmpxchg(&v->counter, guess, guess + a); in __atomic_add_unless()
89 oldval = cmpxchg(&v->counter, guess, guess + a); in atomic64_add_unless()
Datomic.h139 return cmpxchg(&v->counter, o, n); in atomic_cmpxchg()
/linux-4.1.27/arch/frv/include/asm/
Dcmpxchg.h84 #define cmpxchg(ptr, test, new) \ macro
124 #define cmpxchg(ptr, test, new) \ macro
155 return cmpxchg((unsigned long *)ptr, old, new); in __cmpxchg_local()
Datomic.h179 #define atomic_cmpxchg(v, old, new) (cmpxchg(&(v)->counter, old, new))
/linux-4.1.27/drivers/gpu/drm/
Ddrm_lock.c202 prev = cmpxchg(lock, old, new); in drm_lock_take()
245 prev = cmpxchg(lock, old, new); in drm_lock_transfer()
278 prev = cmpxchg(lock, old, new); in drm_legacy_lock_free()
317 prev = cmpxchg(&lock->lock, old, new); in drm_notifier()
364 prev = cmpxchg(lock, old, DRM_KERNEL_CONTEXT); in drm_legacy_idlelock_release()
/linux-4.1.27/lib/
Dllist.c45 } while (cmpxchg(&head->first, first, new_first) != first); in llist_add_batch()
75 entry = cmpxchg(&head->first, old_entry, next); in llist_del_first()
Dgenalloc.c54 } while ((nval = cmpxchg(addr, val, val | mask_to_set)) != val); in set_bits_ll()
69 } while ((nval = cmpxchg(addr, val, val & ~mask_to_clear)) != val); in clear_bits_ll()
Dlru_cache.c71 val = cmpxchg(&lc->flags, 0, LC_LOCKED); in lc_try_lock()
82 val = cmpxchg(&lc->flags, old, new); in lc_try_lock()
/linux-4.1.27/include/asm-generic/
Datomic.h48 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
58 while ((old = cmpxchg(&v->counter, c, c c_op i)) != c) \
176 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
Drwsem.h45 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
75 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
Dcputime_jiffies.h6 #define cmpxchg_cputime(ptr, old, new) cmpxchg(ptr, old, new)
Dcmpxchg.h105 #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) macro
/linux-4.1.27/arch/arc/include/asm/
Dcmpxchg.h69 #define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ macro
81 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/arch/xtensa/include/asm/
Drwsem.h43 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
71 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
Dcmpxchg.h65 #define cmpxchg(ptr,o,n) \ macro
Datomic.h226 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) in ATOMIC_OPS()
/linux-4.1.27/arch/alpha/include/asm/
Dcmpxchg.h52 #define cmpxchg(ptr, o, n) \ macro
63 cmpxchg((ptr), (o), (n)); \
Drwsem.h61 res = cmpxchg(&sem->count, old, new); in __down_read_trylock()
95 long ret = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
Datomic.h119 #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS()
122 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) in ATOMIC_OPS()
/linux-4.1.27/arch/sparc/include/asm/
Drwsem.h37 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
67 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
Datomic_64.h72 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) in ATOMIC_OPS()
91 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
Dcmpxchg_32.h58 #define cmpxchg(ptr, o, n) \ macro
Dcmpxchg_64.h109 #define cmpxchg(ptr,o,n) \ macro
/linux-4.1.27/arch/sh/include/asm/
Drwsem.h38 if (tmp == cmpxchg(&sem->count, tmp, in __down_read_trylock()
66 tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE, in __down_write_trylock()
Dcmpxchg.h62 #define cmpxchg(ptr,o,n) \ macro
Datomic.h39 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/arch/ia64/include/uapi/asm/
Dcmpxchg.h131 #define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n)) macro
134 #define cmpxchg_local cmpxchg
DKbuild10 header-y += cmpxchg.h
/linux-4.1.27/arch/blackfin/include/asm/
Dcmpxchg.h68 #define cmpxchg(ptr, o, n) \ macro
125 #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) macro
/linux-4.1.27/arch/tile/gxio/
Ddma_queue.c81 cmpxchg(&dma_queue->hw_complete_count, in __gxio_dma_queue_update_credits()
107 if (cmpxchg(&dma_queue->hw_complete_count, in __gxio_dma_queue_update_credits()
/linux-4.1.27/Documentation/virtual/kvm/
Dlocking.txt26 On fast page fault path, we will use cmpxchg to atomically set the spte W
28 is safe because whenever changing these bits can be detected by cmpxchg.
33 is not changed during cmpxchg. This is a ABA problem, for example, below case
55 if (cmpxchg(spte, old_spte, old_spte+W)
62 to gfn. For indirect sp, before we do cmpxchg, we call gfn_to_pfn_atomic()
/linux-4.1.27/arch/x86/include/asm/
Dcmpxchg_64.h12 cmpxchg((ptr), (o), (n)); \
Dspinlock.h80 cmpxchg(&lock->head_tail, old.head_tail, new.head_tail); in __ticket_check_and_clear_slowpath()
139 return cmpxchg(&lock->head_tail, old.head_tail, new.head_tail) == old.head_tail; in arch_spin_trylock()
Datomic.h177 return cmpxchg(&v->counter, old, new); in atomic_cmpxchg()
Datomic64_64.h166 return cmpxchg(&v->counter, old, new); in atomic64_cmpxchg()
Dcmpxchg.h148 #define cmpxchg(ptr, old, new) \ macro
/linux-4.1.27/arch/mips/include/asm/
Dcmpxchg.h229 #define cmpxchg(ptr, old, new) __cmpxchg(ptr, old, new, smp_mb__before_llsc(), smp_llsc_mb()) macro
242 cmpxchg((ptr), (o), (n)); \
Datomic.h211 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
493 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/arch/powerpc/include/asm/
Dcmpxchg.h275 #define cmpxchg(ptr, o, n) \ macro
296 cmpxchg((ptr), (o), (n)); \
Datomic.h154 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
415 #define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
Dcputime.h35 #define cmpxchg_cputime(ptr, old, new) cmpxchg(ptr, old, new)
/linux-4.1.27/arch/arm64/include/asm/
Dcmpxchg.h213 #define cmpxchg(ptr, o, n) \ macro
274 #define cmpxchg64(ptr,o,n) cmpxchg((ptr),(o),(n))
Dsync_bitops.h24 #define sync_cmpxchg cmpxchg
/linux-4.1.27/arch/openrisc/include/asm/
DKbuild13 generic-y += cmpxchg-local.h
14 generic-y += cmpxchg.h
/linux-4.1.27/arch/arm/include/asm/
Dsync_bitops.h23 #define sync_cmpxchg cmpxchg
Dcmpxchg.h204 #define cmpxchg(ptr,o,n) \ macro
/linux-4.1.27/arch/hexagon/include/asm/
Dcmpxchg.h69 #define cmpxchg(ptr, old, new) \ macro
/linux-4.1.27/arch/score/include/asm/
Dcmpxchg.h40 #define cmpxchg(ptr, o, n) \ macro
/linux-4.1.27/arch/metag/include/asm/
Dcmpxchg.h56 #define cmpxchg(ptr, o, n) \ macro
/linux-4.1.27/kernel/locking/
Dmcs_spinlock.h100 if (likely(cmpxchg(lock, node, NULL) == node)) in mcs_spin_unlock()
Drwsem-xadd.c265 cmpxchg(&sem->count, RWSEM_WAITING_BIAS, in rwsem_try_write_lock()
288 old = cmpxchg(&sem->count, count, count + RWSEM_ACTIVE_WRITE_BIAS); in rwsem_try_write_lock_unqueued()
Dosq_lock.c134 cmpxchg(&prev->next, node, NULL) == node) in osq_lock()
Drtmutex.c77 # define rt_mutex_cmpxchg(l,c,n) (cmpxchg(&l->owner, c, n) == c)
84 } while (cmpxchg(p, owner, owner | RT_MUTEX_HAS_WAITERS) != owner); in mark_rt_mutex_waiters()
/linux-4.1.27/drivers/staging/unisys/uislib/
Duisqueue.c237 j = cmpxchg((__force unsigned long long *)tgt, i, i | set); in uisqueue_interlocked_or()
255 j = cmpxchg((__force unsigned long long *)tgt, i, i & set); in uisqueue_interlocked_and()
/linux-4.1.27/arch/tile/kernel/
Dpmc.c41 return cmpxchg(&perf_irq, NULL, new_perf_irq); in reserve_pmc_hardware()
/linux-4.1.27/arch/mn10300/include/asm/
Dcmpxchg.h110 #define cmpxchg(ptr, o, n) \ macro
Datomic.h128 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
/linux-4.1.27/arch/ia64/include/asm/
Datomic.h118 #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
122 (cmpxchg(&((v)->counter), old, new))
Dpgtable.h445 } while (cmpxchg((unsigned long *) ptep, old, new) != old); in ptep_set_wrprotect()
/linux-4.1.27/arch/tile/lib/
Dspinlock_64.c60 return cmpxchg(&lock->lock, val, (val + 1) & ~__ARCH_SPIN_NEXT_OVERFLOW) in arch_spin_trylock()
/linux-4.1.27/arch/parisc/include/asm/
Datomic.h74 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
224 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
Dcmpxchg.h75 #define cmpxchg(ptr, o, n) \ macro
/linux-4.1.27/arch/x86/kernel/cpu/
Dperf_event_amd.c250 if (cmpxchg(nb->owners + i, event, NULL) == event) in __amd_put_nb_event_constraints()
319 old = cmpxchg(nb->owners + idx, NULL, event); in __amd_get_nb_event_constraints()
331 cmpxchg(nb->owners + new, event, NULL); in __amd_get_nb_event_constraints()
Dperf_event_amd_uncore.c138 if (cmpxchg(&uncore->events[i], NULL, event) == NULL) { in amd_uncore_add()
168 if (cmpxchg(&uncore->events[i], event, NULL) == event) in amd_uncore_del()
/linux-4.1.27/arch/cris/include/asm/
DKbuild4 generic-y += cmpxchg.h
/linux-4.1.27/arch/avr32/include/asm/
Dcmpxchg.h89 #define cmpxchg(ptr, old, new) \ macro
Datomic.h170 #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/mm/
Dmmzone.c110 } while (unlikely(cmpxchg(&page->flags, old_flags, flags) != old_flags)); in page_cpupid_xchg_last()
Dcleancache.c54 if (cmpxchg(&cleancache_ops, NULL, ops)) in cleancache_register_ops()
Dkmemleak.c1780 if (cmpxchg(&kmemleak_error, 0, 1)) in kmemleak_disable()
Dhuge_memory.c194 if (cmpxchg(&huge_zero_page, NULL, zero_page)) { in get_huge_zero_page()
Dpage_alloc.c6242 old_word = cmpxchg(&bitmap[word_bitidx], word, (word & ~mask) | flags); in set_pfnblock_flags_mask()
Dmemcontrol.c1097 if (cmpxchg(&iter->position, pos, memcg) == pos) { in mem_cgroup_iter()
/linux-4.1.27/Documentation/trace/
Dring-buffer-design.txt38 cmpxchg - hardware-assisted atomic transaction that performs the following:
42 R = cmpxchg(A, C, B) is saying that we replace A with B if and only if
432 When the tail page meets the head pointer, it will use cmpxchg to
460 will also use cmpxchg. If the flag bit in the pointer to the
496 It does a cmpxchg with the pointer to the previous head page to make it
569 performs a cmpxchg to convert the pointer to the head page from the HEADER
676 is not the next page, the tail page is simply updated with a cmpxchg.
683 cmpxchg(tail_page, temp_page, next_page)
712 The above would fail the cmpxchg, but since the tail page has already
910 Since the cmpxchg returns the old value of the pointer the first writer
/linux-4.1.27/net/netfilter/
Dnf_conntrack_labels.c59 } while (cmpxchg(address, old, tmp) != old); in replace_u32()
Dxt_connlimit.c374 cmpxchg(&connlimit_rnd, 0, rand); in connlimit_mt_check()
Dnf_conntrack_core.c787 cmpxchg(&nf_conntrack_hash_rnd, 0, rand); in init_nf_conntrack_hash_rnd()
/linux-4.1.27/arch/m68k/include/asm/
Dcmpxchg.h121 #define cmpxchg(ptr, o, n) \ macro
Datomic.h120 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/net/core/
Ddst.c306 prev = cmpxchg(&dst->_metrics, old, new); in dst_cow_metrics_generic()
325 prev = cmpxchg(&dst->_metrics, old, new); in __dst_destroy_metrics_generic()
/linux-4.1.27/drivers/gpu/drm/i810/
Di810_dma.c60 used = cmpxchg(buf_priv->in_use, I810_BUF_FREE, in i810_freelist_get()
78 used = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, I810_BUF_FREE); in i810_freelist_put()
772 (void)cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, in i810_dma_dispatch_vertex()
871 int used = cmpxchg(buf_priv->in_use, I810_BUF_HARDWARE, in i810_flush_queue()
904 int used = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, in i810_driver_reclaim_buffers()
1042 u = cmpxchg(buf_priv->in_use, I810_BUF_CLIENT, I810_BUF_HARDWARE); in i810_dma_dispatch_mc()
/linux-4.1.27/include/net/
Dinetpeer.h101 cmpxchg(ptr, orig, val) != orig) in inetpeer_ptr_set_peer()
/linux-4.1.27/arch/m32r/include/asm/
Dcmpxchg.h192 #define cmpxchg(ptr, o, n) \ macro
Datomic.h215 #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
/linux-4.1.27/arch/s390/kvm/
Dgaccess.c286 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_lock_simple()
304 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_unlock_simple()
324 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_lock_siif()
338 } while (cmpxchg(&ic->val, old.val, new.val) != old.val); in ipte_unlock_siif()
Dinterrupt.c1037 if (cmpxchg(sigp_ctrl, old_val, new_val) != old_val) { in __inject_extcall_sigpif()
/linux-4.1.27/arch/powerpc/kvm/
Dbook3s_hv_builtin.c248 } while (cmpxchg(&vc->entry_exit_map, ee, ee | me) != ee); in kvmhv_commence_exit()
Dbooke.c610 } while (cmpxchg(&vcpu->arch.tsr, tsr, new_tsr) != tsr); in kvmppc_watchdog_func()
/linux-4.1.27/arch/arc/kernel/
Dsmp.c226 } while (cmpxchg(ipi_data_ptr, old, new) != old); in ipi_send_msg_one()
/linux-4.1.27/include/linux/
Dbitops.h211 } while (cmpxchg(ptr, old, new) != old); \
Dkvm_host.h275 return cmpxchg(&vcpu->mode, IN_GUEST_MODE, EXITING_GUEST_MODE); in kvm_vcpu_exiting_guest_mode()
/linux-4.1.27/drivers/staging/speakup/
Dselection.c177 if (cmpxchg(&speakup_paste_work.tty, NULL, tty) != NULL) in speakup_paste_selection()
/linux-4.1.27/arch/x86/xen/
Dspinlock.c46 ret = cmpxchg(&zero_stats, old, 0); in check_zero()
Dp2m.c549 old_mfn = cmpxchg(top_mfn_p, missing_mfn, mid_mfn_mfn); in alloc_p2m()
/linux-4.1.27/arch/ia64/kernel/
Dtime.c373 ret = cmpxchg(&itc_jitter_data.itc_lastcycle, lcycle, now); in itc_get_cycles()
Dsetup.c1040 if (cmpxchg(&ia64_ctx.max_ctx, old, max_ctx) == old) in cpu_init()
/linux-4.1.27/drivers/xen/
Dmcelog.c170 } while (cmpxchg(&xen_mcelog.flags, flags, 0) != flags); in xen_mce_chrdev_ioctl()
/linux-4.1.27/drivers/phy/
Dphy-rcar-gen2.c85 if (cmpxchg(&channel->selected_phy, -1, phy->number) != -1) in rcar_gen2_phy_init()
/linux-4.1.27/Documentation/locking/
Drt-mutex.txt42 without waiters. The optimized fastpath operations require cmpxchg
Drt-mutex-design.txt325 cmpxchg Tricks
328 Some architectures implement an atomic cmpxchg (Compare and Exchange). This
332 cmpxchg is basically the following function performed atomically:
342 #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c)
/linux-4.1.27/drivers/net/ethernet/sfc/
Dmcdi.c317 return cmpxchg(&mcdi->state, in efx_mcdi_acquire_async()
328 cmpxchg(&mcdi->state, in efx_mcdi_acquire_sync()
360 if (cmpxchg(&mcdi->state, in efx_mcdi_complete_sync()
412 if (cmpxchg(&mcdi->state, in efx_mcdi_complete_async()
Dptp.c1708 (void) cmpxchg(&channel->sync_events_state, SYNC_EVENTS_REQUESTED, in efx_time_sync_event()
/linux-4.1.27/arch/x86/kernel/cpu/mcheck/
Dmce.c184 if (cmpxchg(&mcelog.next, entry, next) == entry) in mce_log()
229 next = cmpxchg(&mcelog.next, prev, 0); in drain_mcelog_buffer()
1855 next = cmpxchg(&mcelog.next, prev, 0); in mce_chrdev_read()
1915 } while (cmpxchg(&mcelog.flags, flags, 0) != flags); in mce_chrdev_ioctl()
/linux-4.1.27/kernel/rcu/
Dtree_plugin.h2693 newoldstate = cmpxchg(&full_sysidle_state, in rcu_sysidle_force_exit()
2848 (void)cmpxchg(&full_sysidle_state, in rcu_sysidle()
2859 (void)cmpxchg(&full_sysidle_state, in rcu_sysidle()
2973 rss = cmpxchg(&full_sysidle_state, in rcu_sys_is_idle()
/linux-4.1.27/drivers/misc/sgi-xp/
Dxpc_sn2.c1726 cmpxchg(&notify->type, notify_type, 0) != notify_type) { in xpc_notify_senders_sn2()
1998 if (cmpxchg(&ch_sn2->w_local_GP.get, get, get + 1) == get) { in xpc_get_deliverable_payload_sn2()
2117 if (cmpxchg(&ch_sn2->w_local_GP.put, put, put + 1) == in xpc_allocate_msg_sn2()
2224 if (cmpxchg(&notify->type, notify_type, 0) == in xpc_send_payload_sn2()
Dxpc_uv.c1371 if (func != NULL && cmpxchg(&msg_slot->func, func, NULL) == func) { in xpc_notify_sender_uv()
1599 if (cmpxchg(&msg_slot->func, func, NULL) != func) { in xpc_send_payload_uv()
Dxpc_main.c1102 if (cmpxchg(&xpc_die_disconnecting, 0, 1)) in xpc_die_deactivate()
/linux-4.1.27/kernel/trace/
Dtrace_functions.c395 new_count = cmpxchg(count, old_count, new_count); in ftrace_stacktrace_count()
Dring_buffer.c928 ret = cmpxchg((unsigned long *)&list->next, in rb_head_page_set()
1021 ret = cmpxchg(ptr, val, (unsigned long)&new->list); in rb_head_page_replace()
1088 old_tail = cmpxchg(&cpu_buffer->tail_page, in rb_tail_page_update()
1608 r = cmpxchg(&prev_page->next, head_page_with_bit, first_page); in rb_insert_pages()
/linux-4.1.27/arch/x86/kernel/acpi/
Dboot.c1707 val = cmpxchg(lock, old, new); in __acpi_acquire_global_lock()
1718 val = cmpxchg(lock, old, new); in __acpi_release_global_lock()
/linux-4.1.27/drivers/misc/genwqe/
Dcard_ddcb.c310 icrc_hsi_shi = cmpxchg(&prev_ddcb->icrc_hsi_shi_32, old, new); in enqueue_ddcb()
657 icrc_hsi_shi = cmpxchg(&pddcb->icrc_hsi_shi_32, in __genwqe_purge_ddcb()
/linux-4.1.27/arch/x86/kvm/
Dpaging_tmpl.h48 #define CMPXCHG cmpxchg
67 #define CMPXCHG cmpxchg
Dx86.c4589 (cmpxchg((t *)(ptr), *(t *)(old), *(t *)(new)) == *(t *)(old))
/linux-4.1.27/arch/x86/kernel/
Dkvm.c614 ret = cmpxchg(&zero_stats, old, 0); in check_zero()
/linux-4.1.27/sound/soc/xtensa/
Dxtfpga-i2s.c172 cmpxchg(&i2s->tx_ptr, tx_ptr, new_tx_ptr); in xtfpga_pcm_push_tx()
/linux-4.1.27/drivers/char/
Drandom.c654 if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig) in credit_entropy_bits()
1051 if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig) in account()
/linux-4.1.27/fs/nfs/flexfilelayout/
Dflexfilelayoutdev.c327 if (cmpxchg(&mirror->cred, NULL, cred)) in ff_layout_update_mirror_cred()
/linux-4.1.27/arch/arm/kernel/
Dtraps.c640 case NR(cmpxchg): in arm_syscall()
/linux-4.1.27/arch/x86/mm/
Dpat.c126 } while (cmpxchg(&pg->flags, old_flags, new_flags) != old_flags); in set_page_memtype()
/linux-4.1.27/drivers/block/
Dataflop.c655 wait_event(fdc_wait, cmpxchg(&fdc_busy, 0, 1) == 0); in do_format()
1501 wait_event(fdc_wait, cmpxchg(&fdc_busy, 0, 1) == 0); in do_fd_request()
/linux-4.1.27/drivers/md/
Ddm-bufio.c339 (void)cmpxchg(&dm_bufio_cache_size, 0, in __cache_size_refresh()
671 (void)cmpxchg(&c->async_write_error, 0, error); in write_endio()
Ddm.c289 (void)cmpxchg(module_param, param, modified_param); in __dm_get_module_param()
/linux-4.1.27/drivers/infiniband/hw/ipath/
Dipath_ruc.c390 (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr, in ipath_ruc_loopback()
Dipath_rc.c1911 (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr, in ipath_rc_rcv()
/linux-4.1.27/net/rds/
Dib_recv.c450 old = cmpxchg(&cache->xfer, NULL, chpfirst); in rds_ib_recv_cache_put()
/linux-4.1.27/drivers/acpi/apei/
Dghes.c637 if (slot != -1 && cmpxchg(ghes_estatus_caches + slot, in ghes_estatus_cache_add()
/linux-4.1.27/drivers/infiniband/hw/qib/
Dqib_ruc.c502 (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr, in qib_ruc_loopback()
Dqib_rc.c2206 (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr, in qib_rc_rcv()
/linux-4.1.27/fs/
Ddirect-io.c546 old = cmpxchg(&sb->s_dio_done_wq, NULL, wq); in sb_init_dio_done_wq()
Daio.c556 cancel = cmpxchg(&kiocb->ki_cancel, old, KIOCB_CANCELLED); in kiocb_cancel()
Dexec.c1701 } while (cmpxchg(&mm->flags, old, new) != old); in set_dumpable()
Dinode.c1974 } while (unlikely(cmpxchg(&inode->i_flags, old_flags, in inode_set_flags()
Dlocks.c226 if (cmpxchg(&inode->i_flctx, NULL, new)) in locks_get_lock_context()
Dbuffer.c1484 b_state_old = cmpxchg(&bh->b_state, b_state, in discard_buffer()
/linux-4.1.27/drivers/target/iscsi/
Discsi_target.c4276 cmpxchg(&conn->tx_thread_active, true, false)) { in iscsit_close_connection()
4282 cmpxchg(&conn->rx_thread_active, true, false)) { in iscsit_close_connection()
4578 sleep = cmpxchg(&conn->tx_thread_active, true, false); in iscsit_logout_post_handler_closesession()
4595 sleep = cmpxchg(&conn->tx_thread_active, true, false); in iscsit_logout_post_handler_samecid()
/linux-4.1.27/Documentation/
Dthis_cpu_ops.txt24 RMW (Read Modify Write) instructions like inc/dec/cmpxchg without the
Datomic_ops.txt539 The routines xchg() and cmpxchg() must provide the same exact
Dmemory-barriers.txt2376 cmpxchg();
/linux-4.1.27/arch/powerpc/xmon/
Dxmon.c357 last_speaker = cmpxchg(&xmon_speaker, 0, me); in get_output_lock()
373 prev = cmpxchg(&xmon_speaker, last_speaker, me); in get_output_lock()
/linux-4.1.27/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x.h645 prev = cmpxchg(&fp->busy_poll_state, old, BNX2X_STATE_FP_NAPI); in bnx2x_fp_lock_napi()
663 return cmpxchg(&fp->busy_poll_state, 0, BNX2X_STATE_FP_POLL) == 0; in bnx2x_fp_lock_poll()
/linux-4.1.27/arch/sparc/
DKconfig215 Sparc32 does not have a CAS instruction like sparc64. cmpxchg()
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb3/
Dcxgb3_offload.c633 (void)cmpxchg(&t->tid_tab[tid].ctx, ctx, NULL); in cxgb3_remove_tid()
/linux-4.1.27/net/netfilter/ipvs/
Dip_vs_sync.c519 n = cmpxchg(&cp->sync_endtime, orig, n); in ip_vs_sync_conn_needed()
/linux-4.1.27/net/sunrpc/auth_gss/
Dsvcauth_gss.c1279 ret = cmpxchg(&sn->use_gss_proxy, -1, type); in set_gss_proxy()
/linux-4.1.27/drivers/block/drbd/
Ddrbd_worker.c1967 } while (cmpxchg(flags, old, new) != old); in get_work_bits()
/linux-4.1.27/fs/btrfs/
Draid56.c239 x = cmpxchg(&info->stripe_hash_table, NULL, table); in btrfs_alloc_stripe_hash_table()
Dinode.c3310 if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEANUP_STARTED)) in btrfs_orphan_cleanup()
/linux-4.1.27/fs/ext4/
Dinode.c684 cmpxchg(&bh->b_state, old_state, new_state) != old_state)); in ext4_update_bh_state()
4061 } while (cmpxchg(&ei->i_flags, old_fl, new_fl) != old_fl); in ext4_get_inode_flags()
/linux-4.1.27/arch/arm/mm/
DKconfig793 Forget about fast user space cmpxchg support.
/linux-4.1.27/drivers/md/bcache/
Dbtree.c841 old = cmpxchg(&c->btree_cache_alloc_lock, NULL, current); in mca_cannibalize_lock()
/linux-4.1.27/drivers/target/
Dtarget_core_transport.c643 if (cmpxchg(&cmd->lun_ref_active, true, false)) in transport_lun_remove_cmd()
/linux-4.1.27/kernel/sched/
Dcore.c485 __old = cmpxchg((ptr), __val, __val | (val)); \
521 old = cmpxchg(&ti->flags, val, val | _TIF_NEED_RESCHED); in set_nr_if_polling()
Dfair.c2160 if (cmpxchg(&mm->numa_next_scan, migrate, next_scan) != migrate) in task_numa_work()
/linux-4.1.27/virt/kvm/
Dkvm_main.c191 cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); in kvm_flush_remote_tlbs()
/linux-4.1.27/drivers/usb/gadget/function/
Df_fs.c88 cmpxchg(&ffs->setup_state, FFS_SETUP_CANCELLED, FFS_NO_SETUP); in ffs_setup_state_clear_cancelled()
/linux-4.1.27/
DMAINTAINERS2731 M: Johannes Weiner <hannes@cmpxchg.org>