Home
last modified time | relevance | path

Searched refs:READ_ONCE (Results 1 – 25 of 1425) sorted by relevance

12345678910>>...57

/linux/net/ipv4/
H A Dtcp_plb.c30 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state()
34 if (cong_ratio < READ_ONCE(net->ipv4.sysctl_tcp_plb_cong_thresh)) in tcp_plb_update_state()
37 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds)) in tcp_plb_update_state()
52 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_check_rehash()
56 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds); in tcp_plb_check_rehash()
58 idle_rehash = READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds) && in tcp_plb_check_rehash()
61 READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds); in tcp_plb_check_rehash()
71 max_suspend = 2 * READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_check_rehash()
96 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state_upon_rto()
99 pause = READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_update_state_upon_rto()
/linux/io_uring/
H A Dfs.c61 ren->old_dfd = READ_ONCE(sqe->fd); in io_renameat_prep()
62 oldf = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_renameat_prep()
63 newf = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_renameat_prep()
64 ren->new_dfd = READ_ONCE(sqe->len); in io_renameat_prep()
65 ren->flags = READ_ONCE(sqe->rename_flags); in io_renameat_prep()
118 un->dfd = READ_ONCE(sqe->fd); in io_unlinkat_prep()
120 un->flags = READ_ONCE(sqe->unlink_flags); in io_unlinkat_prep()
124 fname = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_unlinkat_prep()
170 mkd->dfd = READ_ONCE(sqe->fd); in io_mkdirat_prep()
171 mkd->mode = READ_ONCE(sq in io_mkdirat_prep()
[all...]
H A Dcmd_net.c19 level = READ_ONCE(sqe->level); in io_uring_cmd_getsockopt()
23 optval = u64_to_user_ptr(READ_ONCE(sqe->optval)); in io_uring_cmd_getsockopt()
24 optname = READ_ONCE(sqe->optname); in io_uring_cmd_getsockopt()
25 optlen = READ_ONCE(sqe->optlen); in io_uring_cmd_getsockopt()
47 optval = u64_to_user_ptr(READ_ONCE(sqe->optval)); in io_uring_cmd_setsockopt()
48 optname = READ_ONCE(sqe->optname); in io_uring_cmd_setsockopt()
49 optlen = READ_ONCE(sqe->optlen); in io_uring_cmd_setsockopt()
50 level = READ_ONCE(sqe->level); in io_uring_cmd_setsockopt()
148 uaddr = u64_to_user_ptr(READ_ONCE(sqe->addr)); in io_uring_cmd_getsockname()
149 ulen = u64_to_user_ptr(READ_ONCE(sqe->addr3)); in io_uring_cmd_getsockname()
[all …]
H A Dsync.c32 sync->off = READ_ONCE(sqe->off); in io_sfr_prep()
33 sync->len = READ_ONCE(sqe->len); in io_sfr_prep()
34 sync->flags = READ_ONCE(sqe->sync_range_flags); in io_sfr_prep()
60 sync->flags = READ_ONCE(sqe->fsync_flags); in io_fsync_prep()
64 sync->off = READ_ONCE(sqe->off); in io_fsync_prep()
67 sync->len = READ_ONCE(sqe->len); in io_fsync_prep()
94 sync->off = READ_ONCE(sqe->off); in io_fallocate_prep()
95 sync->len = READ_ONCE(sqe->addr); in io_fallocate_prep()
96 sync->mode = READ_ONCE(sqe->len); in io_fallocate_prep()
H A Dadvise.c39 ma->addr = READ_ONCE(sqe->addr); in io_madvise_prep()
40 ma->len = READ_ONCE(sqe->off); in io_madvise_prep()
42 ma->len = READ_ONCE(sqe->len); in io_madvise_prep()
43 ma->advice = READ_ONCE(sqe->fadvise_advice); in io_madvise_prep()
86 fa->offset = READ_ONCE(sqe->off); in io_fadvise_prep()
87 fa->len = READ_ONCE(sqe->addr); in io_fadvise_prep()
89 fa->len = READ_ONCE(sqe->len); in io_fadvise_prep()
90 fa->advice = READ_ONCE(sqe->fadvise_advice); in io_fadvise_prep()
H A Dxattr.c51 name = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_getxattr_prep()
52 ix->ctx.value = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in __io_getxattr_prep()
53 ix->ctx.size = READ_ONCE(sqe->len); in __io_getxattr_prep()
54 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_getxattr_prep()
92 path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); in io_getxattr_prep()
130 name = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_setxattr_prep()
131 ix->ctx.cvalue = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in __io_setxattr_prep()
133 ix->ctx.size = READ_ONCE(sqe->len); in __io_setxattr_prep()
134 ix->ctx.flags = READ_ONCE(sqe->xattr_flags); in __io_setxattr_prep()
164 path = u64_to_user_ptr(READ_ONCE(sqe->addr3)); in io_setxattr_prep()
H A Dopenclose.c68 open->dfd = READ_ONCE(sqe->fd); in __io_openat_prep()
69 fname = u64_to_user_ptr(READ_ONCE(sqe->addr)); in __io_openat_prep()
75 open->file_slot = READ_ONCE(sqe->file_index); in __io_openat_prep()
97 u64 mode = READ_ONCE(sqe->len); in io_openat_prep()
98 u64 flags = READ_ONCE(sqe->open_flags); in io_openat_prep()
111 how = u64_to_user_ptr(READ_ONCE(sqe->addr2)); in io_openat2_prep()
112 len = READ_ONCE(sqe->len); in io_openat2_prep()
228 close->fd = READ_ONCE(sqe->fd); in io_close_prep()
229 close->file_slot = READ_ONCE(sqe->file_index); in io_close_prep()
288 flags = READ_ONCE(sqe->install_fd_flags); in io_install_fixed_fd_prep()
[all …]
/linux/include/net/
H A Dbusy_poll.h42 return READ_ONCE(sysctl_net_busy_poll); in net_busy_loop_on()
47 return READ_ONCE(sk->sk_ll_usec) && !signal_pending(current); in sk_can_busy_loop()
89 unsigned long bp_usec = READ_ONCE(sysctl_net_busy_poll); in busy_loop_timeout()
105 unsigned long bp_usec = READ_ONCE(sk->sk_ll_usec); in sk_busy_loop_timeout()
120 unsigned int napi_id = READ_ONCE(sk->sk_napi_id); in sk_busy_loop()
124 READ_ONCE(sk->sk_prefer_busy_poll), in sk_busy_loop()
125 READ_ONCE(sk->sk_busy_poll_budget) ?: BUSY_POLL_BUDGET); in sk_busy_loop()
152 if (unlikely(READ_ONCE(sk->sk_napi_id) != skb->napi_id)) in sk_mark_napi_id()
174 if (!READ_ONCE(sk->sk_napi_id)) in __sk_mark_napi_id_once()
/linux/tools/testing/selftests/kvm/
H A Dirqfd_test.c55 while (!READ_ONCE(done)) { in secondary_irqfd_juggler()
56 juggle_eventfd_secondary(vm1, READ_ONCE(__eventfd)); in secondary_irqfd_juggler()
57 juggle_eventfd_secondary(vm2, READ_ONCE(__eventfd)); in secondary_irqfd_juggler()
123 kvm_irqfd(vm1, 11, READ_ONCE(__eventfd), KVM_IRQFD_FLAG_DEASSIGN); in main()
124 kvm_irqfd(vm1, 12, READ_ONCE(__eventfd), KVM_IRQFD_FLAG_DEASSIGN); in main()
125 kvm_irqfd(vm1, 13, READ_ONCE(__eventfd), KVM_IRQFD_FLAG_DEASSIGN); in main()
126 kvm_irqfd(vm1, 14, READ_ONCE(__eventfd), KVM_IRQFD_FLAG_DEASSIGN); in main()
127 kvm_irqfd(vm1, 10, READ_ONCE(__eventfd), KVM_IRQFD_FLAG_DEASSIGN); in main()
/linux/Documentation/litmus-tests/locking/
H A DDCL-broken.litmus21 r0 = READ_ONCE(*flag);
24 r1 = READ_ONCE(*flag);
31 r2 = READ_ONCE(*data);
40 r0 = READ_ONCE(*flag);
43 r1 = READ_ONCE(*flag);
50 r2 = READ_ONCE(*data);
/linux/security/selinux/include/
H A Dsecurity.h127 return READ_ONCE(selinux_state.enforcing); in enforcing_enabled()
153 return READ_ONCE(selinux_state.policycap[POLICYDB_CAP_NETPEER]); in selinux_policycap_netpeer()
158 return READ_ONCE(selinux_state.policycap[POLICYDB_CAP_OPENPERM]); in selinux_policycap_openperm()
163 return READ_ONCE(selinux_state.policycap[POLICYDB_CAP_EXTSOCKCLASS]); in selinux_policycap_extsockclass()
168 return READ_ONCE(selinux_state.policycap[POLICYDB_CAP_ALWAYSNETWORK]); in selinux_policycap_alwaysnetwork()
173 return READ_ONCE(selinux_state.policycap[POLICYDB_CAP_CGROUPSECLABEL]); in selinux_policycap_cgroupseclabel()
178 return READ_ONCE( in selinux_policycap_nnp_nosuid_transition()
184 return READ_ONCE( in selinux_policycap_genfs_seclabel_symlinks()
190 return READ_ONCE( in selinux_policycap_ioctl_skip_cloexec()
196 return READ_ONCE( in selinux_policycap_userspace_initial_context()
[all...]
/linux/arch/arm64/include/asm/
H A Dpreempt.h12 return READ_ONCE(current_thread_info()->preempt.count); in preempt_count()
46 u32 pc = READ_ONCE(current_thread_info()->preempt.count); in __preempt_count_add()
53 u32 pc = READ_ONCE(current_thread_info()->preempt.count); in __preempt_count_sub()
61 u64 pc = READ_ONCE(ti->preempt_count); in __preempt_count_dec_and_test()
73 return !pc || !READ_ONCE(ti->preempt_count); in __preempt_count_dec_and_test()
78 u64 pc = READ_ONCE(current_thread_info()->preempt_count); in should_resched()
/linux/drivers/net/ethernet/mellanox/mlx4/
H A Den_port.c165 packets += READ_ONCE(ring->packets); in mlx4_en_fold_software_stats()
166 bytes += READ_ONCE(ring->bytes); in mlx4_en_fold_software_stats()
176 packets += READ_ONCE(ring->packets); in mlx4_en_fold_software_stats()
177 bytes += READ_ONCE(ring->bytes); in mlx4_en_fold_software_stats()
254 sw_rx_dropped += READ_ONCE(ring->dropped); in mlx4_en_DUMP_ETH_STATS()
255 priv->port_stats.rx_chksum_good += READ_ONCE(ring->csum_ok); in mlx4_en_DUMP_ETH_STATS()
256 priv->port_stats.rx_chksum_none += READ_ONCE(ring->csum_none); in mlx4_en_DUMP_ETH_STATS()
257 priv->port_stats.rx_chksum_complete += READ_ONCE(ring->csum_complete); in mlx4_en_DUMP_ETH_STATS()
258 priv->port_stats.rx_alloc_pages += READ_ONCE(ring->rx_alloc_pages); in mlx4_en_DUMP_ETH_STATS()
259 priv->xdp_stats.rx_xdp_drop += READ_ONCE(ring->xdp_drop); in mlx4_en_DUMP_ETH_STATS()
[all …]
/linux/drivers/md/dm-vdo/
H A Dfunnel-queue.c46 struct funnel_queue_entry *next = READ_ONCE(oldest->next); in get_oldest()
61 next = READ_ONCE(oldest->next); in get_oldest()
69 struct funnel_queue_entry *newest = READ_ONCE(queue->newest); in get_oldest()
86 next = READ_ONCE(oldest->next); in get_oldest()
116 queue->oldest = READ_ONCE(oldest->next); in vdo_funnel_queue_poll()
166 if (READ_ONCE(queue->newest) != &queue->stub) in vdo_is_funnel_queue_idle()
/linux/kernel/rcu/
H A Dsrcutiny.c106 newval = READ_ONCE(ssp->srcu_lock_nesting[idx]) - 1; in __srcu_read_unlock()
109 if (!newval && READ_ONCE(ssp->srcu_gp_waiting) && in_task() && !irqs_disabled()) in __srcu_read_unlock()
128 if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) { in srcu_drive_gp()
148 !READ_ONCE(ssp->srcu_lock_nesting[idx]), HZ / 10); in srcu_drive_gp()
149 } while (READ_ONCE(ssp->srcu_lock_nesting[idx])); in srcu_drive_gp()
173 idx = ULONG_CMP_LT(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max)); in srcu_drive_gp()
186 if (ULONG_CMP_GE(READ_ONCE(ssp->srcu_idx_max), cookie)) { in srcu_gp_start_if_needed()
190 if (!READ_ONCE(ssp->srcu_gp_running)) { in srcu_gp_start_if_needed()
254 ret = (READ_ONCE(ssp->srcu_idx) + 3) & ~0x1; in get_state_synchronize_srcu()
284 unsigned long cur_s = READ_ONCE(ssp->srcu_idx); in poll_state_synchronize_srcu()
H A Drcu_segcblist.h15 return READ_ONCE(rclp->len); in rcu_cblist_n_cbs()
45 return !READ_ONCE(rsclp->head); in rcu_segcblist_empty()
54 return READ_ONCE(rsclp->len); in rcu_segcblist_n_cbs()
73 return READ_ONCE(rsclp->flags) & flags; in rcu_segcblist_test_flags()
105 return !READ_ONCE(*READ_ONCE(rsclp->tails[seg])); in rcu_segcblist_restempty()
/linux/net/sched/
H A Dsch_dualpi2.c292 prob = READ_ONCE(q->pi2_prob); in must_drop()
633 qc = READ_ONCE(q->c_head_ts); in get_queue_delays()
634 ql = READ_ONCE(q->l_head_ts); in get_queue_delays()
953 step_in_pkts = READ_ONCE(q->step_in_packets); in dualpi2_dump()
954 step_th = READ_ONCE(q->step_thresh); in dualpi2_dump()
961 (nla_put_u32(skb, TCA_DUALPI2_LIMIT, READ_ONCE(sch->limit)) || in dualpi2_dump()
963 READ_ONCE(q->memory_limit)) || in dualpi2_dump()
965 convert_ns_to_usec(READ_ONCE(q->pi2_target))) || in dualpi2_dump()
967 convert_ns_to_usec(READ_ONCE(q->pi2_tupdate))) || in dualpi2_dump()
969 dualpi2_unscale_alpha_beta(READ_ONCE( in dualpi2_dump()
[all...]
/linux/arch/s390/lib/
H A Dspinlock.c169 old = READ_ONCE(lp->lock); in arch_spin_lock_queued()
207 while (READ_ONCE(node->prev) != NULL) { in arch_spin_lock_queued()
221 old = READ_ONCE(lp->lock); in arch_spin_lock_queued()
241 while ((next = READ_ONCE(node->next)) == NULL) in arch_spin_lock_queued()
257 owner = arch_spin_yield_target(READ_ONCE(lp->lock), NULL); in arch_spin_lock_classic()
297 owner = READ_ONCE(lp->lock); in arch_spin_trylock_retry()
311 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait()
323 while (READ_ONCE(rw->cnts) & 0x10000) in arch_read_lock_wait()
340 old = READ_ONCE(rw->cnts); in arch_write_lock_wait()
356 cpu = READ_ONCE(lp->lock) & _Q_LOCK_CPU_MASK; in arch_spin_relax()
/linux/tools/memory-model/Documentation/
H A Dlocking.txt43 r0 = READ_ONCE(y);
45 r1 = READ_ONCE(x);
66 r0 = READ_ONCE(y);
68 r1 = READ_ONCE(x);
101 r0 = READ_ONCE(flag);
104 r1 = READ_ONCE(flag);
111 r2 = READ_ONCE(data);
116 READ_ONCE() of "flag" and the READ_ONCE() of "data". Second, there is
129 r1 = READ_ONCE(flag);
136 r2 = READ_ONCE(data);
[all …]
H A Dcontrol-dependencies.txt15 q = READ_ONCE(a);
17 p = READ_ONCE(b);
25 q = READ_ONCE(a);
28 p = READ_ONCE(b);
35 q = READ_ONCE(a);
40 of ordering. But please note that neither the READ_ONCE() nor the
41 WRITE_ONCE() are optional. Without the READ_ONCE(), the compiler might
55 So don't leave out either the READ_ONCE() or the WRITE_ONCE().
56 In particular, although READ_ONCE() does force the compiler to emit a
62 q = READ_ONCE(a);
[all …]
/linux/include/linux/
H A Dsrcutiny.h81 idx = ((READ_ONCE(ssp->srcu_idx) + 1) & 0x2) >> 1; in __srcu_read_lock()
82 WRITE_ONCE(ssp->srcu_lock_nesting[idx], READ_ONCE(ssp->srcu_lock_nesting[idx]) + 1); in __srcu_read_lock()
144 idx = ((data_race(READ_ONCE(ssp->srcu_idx)) + 1) & 0x2) >> 1; in srcu_torture_stats_print()
147 data_race(READ_ONCE(ssp->srcu_lock_nesting[!idx])),
148 data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])),
149 data_race(READ_ONCE(ssp->srcu_idx)),
150 data_race(READ_ONCE(ssp->srcu_idx_max)));
/linux/drivers/gpu/drm/imagination/
H A Dpvr_ccb.c123 u32 next_write_offset = (READ_ONCE(ctrl->write_offset) + 1) & READ_ONCE(ctrl->wrap_mask); in pvr_ccb_slot_available_locked()
127 if (READ_ONCE(ctrl->read_offset) != next_write_offset) { in pvr_ccb_slot_available_locked()
172 while ((read_offset = READ_ONCE(ctrl->read_offset)) != READ_ONCE(ctrl->write_offset)) { in pvr_fwccb_process()
175 WRITE_ONCE(ctrl->read_offset, (read_offset + 1) & READ_ONCE(ctrl->wrap_mask)); in pvr_fwccb_process()
219 u32 wr_offset = READ_ONCE(ctrl->write_offset); in pvr_kccb_used_slot_count_locked()
220 u32 rd_offset = READ_ONCE(ctrl->read_offset); in pvr_kccb_used_slot_count_locked()
258 old_write_offset = READ_ONCE(ctrl->write_offset); in pvr_kccb_send_cmd_reserved_powered()
406 int ret = wait_event_timeout(pvr_dev->kccb.rtn_q, READ_ONCE(pvr_dev->kccb.rtn[slot_nr]) & in pvr_kccb_wait_for_completion()
410 *rtn_out = READ_ONCE(pvr_dev->kccb.rtn[slot_nr]); in pvr_kccb_wait_for_completion()
431 idle = (READ_ONCE(ctrl->write_offset) == READ_ONCE(ctrl->read_offset)); in pvr_kccb_is_idle()
/linux/kernel/cgroup/
H A Dmisc.c159 if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type]))) in misc_cg_try_charge()
169 if (new_usage > READ_ONCE(res->max) || in misc_cg_try_charge()
170 new_usage > READ_ONCE(misc_res_capacity[type])) { in misc_cg_try_charge()
223 if (READ_ONCE(misc_res_capacity[i])) { in misc_cg_max_show()
224 max = READ_ONCE(cg->res[i].max); in misc_cg_max_show()
289 if (READ_ONCE(misc_res_capacity[type])) in misc_cg_max_write()
313 if (READ_ONCE(misc_res_capacity[i]) || usage) in misc_cg_current_show()
336 if (READ_ONCE(misc_res_capacity[i]) || watermark) in misc_cg_peak_show()
359 cap = READ_ONCE(misc_res_capacity[i]); in misc_cg_capacity_show()
378 if (READ_ONCE(misc_res_capacity[i]) || events) in __misc_events_show()
/linux/arch/x86/include/asm/
H A Dresctrl.h103 u32 closid = READ_ONCE(state->default_closid); in __resctrl_sched_in()
104 u32 rmid = READ_ONCE(state->default_rmid); in __resctrl_sched_in()
112 tmp = READ_ONCE(tsk->closid); in __resctrl_sched_in()
118 tmp = READ_ONCE(tsk->rmid); in __resctrl_sched_in()
155 return READ_ONCE(tsk->closid) == closid; in resctrl_arch_match_closid()
161 return READ_ONCE(tsk->rmid) == rmid; in resctrl_arch_match_rmid()
/linux/drivers/iommu/intel/
H A Dpasid.h57 return READ_ONCE(pde->val) & PASID_PTE_PRESENT; in pasid_pde_is_present()
67 return phys_to_virt(READ_ONCE(pde->val) & PDE_PFN_MASK); in get_pasid_table_from_pde()
73 return READ_ONCE(pte->val[0]) & PASID_PTE_PRESENT; in pasid_pte_is_present()
79 return READ_ONCE(pte->val[0]) & PASID_PTE_FPD; in pasid_pte_is_fault_disabled()
85 return (u16)((READ_ONCE(pte->val[0]) >> 6) & 0x7); in pasid_pte_get_pgtt()
116 old = READ_ONCE(*ptr); in pasid_set_bits()
122 return READ_ONCE(*ptr); in pasid_get_bits()
141 return (u16)(READ_ONCE(pe->val[1]) & GENMASK_ULL(15, 0)); in pasid_get_domain_id()

12345678910>>...57