Home
last modified time | relevance | path

Searched full:atomic (Results 1 – 25 of 1974) sorted by relevance

12345678910>>...79

/linux-5.10/arch/mips/include/asm/octeon/
Dcvmx-fau.h123 * @reg: FAU atomic register to access. 0 <= reg < 2048.
127 * Returns Address to store for atomic update
139 * @tagwait: Should the atomic add wait for the current tag switch
143 * @reg: FAU atomic register to access. 0 <= reg < 2048.
150 * Returns Address to read from for atomic update
162 * Perform an atomic 64 bit add
164 * @reg: FAU atomic register to access. 0 <= reg < 2048.
177 * Perform an atomic 32 bit add
179 * @reg: FAU atomic register to access. 0 <= reg < 2048.
193 * Perform an atomic 16 bit add
[all …]
/linux-5.10/include/drm/
Ddrm_modeset_helper_vtables.h59 * helpers and the new atomic modesetting helpers.
73 * This callback is used by the legacy CRTC helpers. Atomic helpers
75 * facilitate transitions to atomic, but it is deprecated. Instead
88 * This callback is used by the legacy CRTC helpers. Atomic helpers
90 * transitions to atomic, but it is deprecated. Instead @atomic_disable
103 * This callback is used by the legacy CRTC helpers. Atomic helpers
105 * transitions to atomic, but it is deprecated. Instead @atomic_enable
123 * atomic helpers to validate modes supplied by userspace in
130 * Since this function is both called from the check phase of an atomic
155 * This function is used by both legacy CRTC helpers and atomic helpers.
[all …]
Ddrm_atomic.h37 * This structure is used to track pending modeset changes and atomic commit on
45 * atomic commit thread hardware
61 * clean up atomic state
68 * drm_atomic_helper_setup_commit() from the atomic helper library.
198 * struct drm_private_state_funcs - atomic state functions for private objects
200 * These hooks are used by atomic helpers to create, swap and destroy states of
203 * added to the atomic states is expected to have an implementation of these
216 * Duplicated atomic state or NULL when obj->state is not
231 * struct drm_private_obj - base struct for driver private atomic object
265 * @state: Current atomic state for this driver private object.
[all …]
Ddrm_crtc.h96 * state like @plane_mask so drivers not converted over to atomic helpers should
117 * &drm_mode_config_funcs.atomic_check callback to reject an atomic
126 * @planes_changed: Planes on this crtc are updated. Used by the atomic
127 * helpers and drivers to steer the atomic commit control flow.
132 * @mode_changed: @mode or @enable has been changed. Used by the atomic
133 * helpers and drivers to steer the atomic commit control flow. See also
144 * @active_changed: @active has been toggled. Used by the atomic
145 * helpers and drivers to steer the atomic commit control flow. See also
152 * either in their state or routing. Used by the atomic
153 * helpers and drivers to steer the atomic commit control flow. See also
[all …]
Ddrm_plane.h70 * Optional fence to wait for before scanning out @fb. The core atomic
276 * Drivers implementing atomic modeset should use
299 * Drivers implementing atomic modeset should use
325 * Atomic drivers can use drm_atomic_helper_plane_reset() to reset
326 * atomic state using this hook.
337 * driver-private properties. For atomic drivers it is not used because
350 * Duplicate the current atomic state for this plane and return it.
351 * The core and helpers guarantee that any atomic state duplicated with
357 * This callback is mandatory for atomic drivers.
359 * Atomic drivers which don't subclass &struct drm_plane_state should use
[all …]
/linux-5.10/Documentation/core-api/
Datomic_ops.rst2 Semantics and Behavior of Atomic and Bitmask Operations
8 maintainers on how to implement atomic counter, bitops, and spinlock
11 Atomic Type And Operations
41 The initializer is atomic in that the return values of the atomic operations
62 The setting is atomic in that the return values of the atomic operations by
73 The read is atomic in that the return value is guaranteed to be one of the
180 locks, or atomic operations if variable a can change at runtime!
186 Now, we move onto the atomic operation interfaces typically implemented with
215 and after the atomic operation calls are strongly ordered with respect
216 to the atomic operation itself.
[all …]
Dlocal_ops.rst5 Semantics and Behavior of Local Atomic Operations
11 This document explains the purpose of the local atomic operations, how
26 Purpose of local atomic operations
29 Local atomic operations are meant to provide fast and highly reentrant per CPU
30 counters. They minimize the performance cost of standard atomic operations by
34 Having fast per CPU atomic counters is interesting in many cases: it does not
39 Local atomic operations only guarantee variable modification atomicity wrt the
50 It can be done by slightly modifying the standard atomic operations: only
63 Rules to follow when using local atomic operations
82 "``long``", aligned, variables are always atomic. Since no memory
[all …]
/linux-5.10/arch/riscv/include/asm/
Datomic.h50 * First, the atomic ops that have no ordering constraints and therefor don't
56 void atomic##prefix##_##op(c_type i, atomic##prefix##_t *v) \
84 * Atomic ops that have ordered, relaxed, acquire, and release variants. in ATOMIC_OPS()
90 c_type atomic##prefix##_fetch_##op##_relaxed(c_type i, \ in ATOMIC_OPS()
91 atomic##prefix##_t *v) \ in ATOMIC_OPS()
102 c_type atomic##prefix##_fetch_##op(c_type i, atomic##prefix##_t *v) \
115 c_type atomic##prefix##_##op##_return_relaxed(c_type i, \
116 atomic##prefix##_t *v) \
118 return atomic##prefix##_fetch_##op##_relaxed(i, v) c_op I; \
121 c_type atomic##prefix##_##op##_return(c_type i, atomic##prefix##_t *v) \
[all …]
/linux-5.10/scripts/atomic/
Dgen-atomic-instrumented.sh6 . ${ATOMICDIR}/atomic-tbl.sh
25 # An atomic RMW: if this parameter is not a constant, and this atomic is
44 # gen_guard(meta, atomic, pfx, name, sfx, order)
48 local atomic="$1"; shift
54 local atomicname="arch_${atomic}_${pfx}${name}${sfx}${order}"
58 # We definitely need a preprocessor symbol for this atomic if it is an
72 #gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int, arg...)
80 local atomic="$1"; shift
83 local atomicname="${atomic}_${pfx}${name}${sfx}${order}"
85 local guard="$(gen_guard "${meta}" "${atomic}" "${pfx}" "${name}" "${sfx}" "${order}")"
[all …]
Dgen-atomic-long.sh6 . ${ATOMICDIR}/atomic-tbl.sh
8 #gen_cast(arg, int, atomic)
13 local atomic="$1"; shift
17 printf "($(gen_param_type "${arg}" "${int}" "${atomic}"))"
20 #gen_args_cast(int, atomic, arg...)
24 local atomic="$1"; shift
27 local cast="$(gen_cast "$1" "${int}" "${atomic}")"
35 #gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int, arg...)
40 local atomic="$1"; shift
45 local argscast="$(gen_args_cast "${int}" "${atomic}" "$@")"
[all …]
Dgen-atomics.sh4 # Generate atomic headers
11 gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h
12 gen-atomic-long.sh asm-generic/atomic-long.h
13 gen-atomic-fallback.sh linux/atomic-arch-fallback.h arch_
14 gen-atomic-fallback.sh linux/atomic-fallback.h
Dgen-atomic-fallback.sh7 . ${ATOMICDIR}/atomic-tbl.sh
9 #gen_template_fallback(template, meta, pfx, name, sfx, order, arch, atomic, int, args...)
19 local atomic="$1"; shift
22 local atomicname="${arch}${atomic}_${pfx}${name}${sfx}${order}"
26 local params="$(gen_params "${int}" "${atomic}" "$@")"
37 #gen_proto_fallback(meta, pfx, name, sfx, order, arch, atomic, int, args...)
69 local atomic="$2"
71 local basename="${arch}${atomic}_${pfx}${name}${sfx}"
76 #gen_proto_order_variants(meta, pfx, name, sfx, arch, atomic, int, args...)
84 local atomic="$2"
[all …]
Datomic-tbl.sh93 # gen_param_type(arg, int, atomic)
98 local atomic="$1"; shift
103 v) type="${atomic}_t *";;
104 cv) type="const ${atomic}_t *";;
110 #gen_param(arg, int, atomic)
115 local atomic="$1"; shift
117 local type="$(gen_param_type "${arg}" "${int}" "${atomic}")"
122 #gen_params(int, atomic, arg...)
126 local atomic="$1"; shift
129 gen_param "$1" "${int}" "${atomic}"
Dcheck-atomics.sh4 # Check if atomic headers are up-to-date
12 printf "sha1sum not available, skipping atomic header checks.\n"
17 asm-generic/atomic-instrumented.h
18 asm-generic/atomic-long.h
19 linux/atomic-arch-fallback.h
20 linux/atomic-fallback.h
/linux-5.10/lib/
Ddec_and_lock.c4 #include <linux/atomic.h>
12 * if (atomic_dec_and_test(&atomic)) {
19 * "atomic".
21 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) in _atomic_dec_and_lock() argument
24 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock()
29 if (atomic_dec_and_test(atomic)) in _atomic_dec_and_lock()
37 int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, in _atomic_dec_and_lock_irqsave() argument
41 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock_irqsave()
46 if (atomic_dec_and_test(atomic)) in _atomic_dec_and_lock_irqsave()
Datomic64_test.c13 #include <linux/atomic.h>
22 atomic##bit##_set(&v, v0); \
24 atomic##bit##_##op(val, &v); \
26 WARN(atomic##bit##_read(&v) != r, "%Lx != %Lx\n", \
27 (unsigned long long)atomic##bit##_read(&v), \
32 * Test for a atomic operation family,
46 atomic##bit##_set(&v, v0); \
49 BUG_ON(atomic##bit##_##op(val, &v) != r); \
50 BUG_ON(atomic##bit##_read(&v) != r); \
55 atomic##bit##_set(&v, v0); \
[all …]
Dpercpu-refcount.c56 * change the start state to atomic with the latter setting the initial refcount
190 * time is equivalent and saves us atomic operations: in percpu_ref_switch_to_atomic_rcu()
195 "percpu ref (%ps) <= 0 (%ld) after switching to atomic", in percpu_ref_switch_to_atomic_rcu()
215 /* switching from percpu to atomic */ in __percpu_ref_switch_to_atomic()
265 * If the previous ATOMIC switching hasn't finished yet, wait for in __percpu_ref_switch_mode()
266 * its completion. If the caller ensures that ATOMIC switching in __percpu_ref_switch_mode()
279 * percpu_ref_switch_to_atomic - switch a percpu_ref to atomic mode
280 * @ref: percpu_ref to switch to atomic mode
286 * Schedule switching of @ref to atomic mode. All its percpu counts will
287 * be collected to the main atomic counter. On completion, when all CPUs
[all …]
/linux-5.10/Documentation/
Datomic_bitops.txt2 Atomic bitops
5 While our bitmap_{}() functions are non-atomic, we have a number of operations
6 operating on single bits in a bitmap that are atomic.
18 RMW atomic operations without return value:
23 RMW atomic operations with return value:
33 All RMW atomic operations have a '__' prefixed variant which is non-atomic.
39 Non-atomic ops:
69 Since a platform only has a single means of achieving atomic operations
Datomic_t.txt2 On atomic types (atomic_t atomic64_t and atomic_long_t).
4 The atomic type provides an interface to the architecture's means of atomic
5 RMW operations between CPUs (atomic operations on MMIO are not supported and
20 RMW atomic operations:
67 Therefore, an explicitly unsigned variant of the atomic ops is strictly
91 C Atomic-RMW-ops-are-atomic-WRT-atomic_set
118 The obvious case where this is not so is when we need to implement atomic ops
155 All these operations are SMP atomic; that is, the operations (for a single
156 atomic variable) can be fully ordered and no intermediate state is lost or
192 only apply to the RMW atomic ops and can be used to augment/upgrade the
[all …]
/linux-5.10/Documentation/litmus-tests/
DREADME12 atomic (/atomic derectory)
15 Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus
16 Test that an atomic RMW followed by a smp_mb__after_atomic() is
20 Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus
21 Test that atomic_set() cannot break the atomicity of atomic RMWs.
/linux-5.10/drivers/gpu/drm/
Ddrm_atomic.c58 * @state: atomic state
74 * drm_atomic_state_init - init new atomic state
76 * @state: atomic state
78 * Default implementation for filling in a new atomic state.
103 DRM_DEBUG_ATOMIC("Allocated atomic state %p\n", state); in drm_atomic_state_init()
113 * drm_atomic_state_alloc - allocate atomic state
116 * This allocates an empty atomic state to track updates.
141 * drm_atomic_state_default_clear - clear base atomic state
142 * @state: atomic state
144 * Default implementation for clearing atomic state.
[all …]
Ddrm_atomic_state_helper.c42 * DOC: atomic state reset and initialization
44 * Both the drm core and the atomic helpers assume that there is always the full
45 * and correct atomic software state for all connectors, CRTCs and planes
53 * the atomic helpers provide default reset implementations for all hooks.
55 * On the upside the precise state tracking of atomic simplifies system suspend
64 * @crtc_state: atomic CRTC state, must not be NULL
108 * Resets the atomic state for @crtc by freeing the state pointer (which might
124 * __drm_atomic_helper_crtc_duplicate_state - copy atomic CRTC state
126 * @state: atomic CRTC state
128 * Copies atomic state from a CRTC's current state and resets inferred values.
[all …]
/linux-5.10/scripts/atomic/fallbacks/
Dfetch_add_unless3 * ${arch}${atomic}_fetch_add_unless - add unless the number is already a given value
4 * @v: pointer of type ${atomic}_t
12 ${arch}${atomic}_fetch_add_unless(${atomic}_t *v, ${int} a, ${int} u)
14 ${int} c = ${arch}${atomic}_read(v);
19 } while (!${arch}${atomic}_try_cmpxchg(v, &c, c + a));
/linux-5.10/include/asm-generic/bitops/
Dinstrumented-non-atomic.h4 * This file provides wrappers with sanitizer instrumentation for non-atomic
21 * Unlike set_bit(), this function is non-atomic. If it is called on the same
36 * Unlike clear_bit(), this function is non-atomic. If it is called on the same
51 * Unlike change_bit(), this function is non-atomic. If it is called on the same
65 * We treat non-atomic read-write bitops a little more special. in __instrument_read_write_bitop()
69 * assume-plain-writes-atomic rule): in __instrument_read_write_bitop()
72 * races with unmarked readers -> check "atomic" write. in __instrument_read_write_bitop()
90 * This operation is non-atomic. If two instances of this operation race, one
104 * This operation is non-atomic. If two instances of this operation race, one
118 * This operation is non-atomic. If two instances of this operation race, one
/linux-5.10/net/rds/
Drdma.c860 * Fill in rds_message for an atomic request.
870 || rm->atomic.op_active) in rds_cmsg_atomic()
878 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
879 rm->atomic.op_m_fadd.add = args->fadd.add; in rds_cmsg_atomic()
880 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic()
883 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic()
884 rm->atomic.op_m_fadd.add = args->m_fadd.add; in rds_cmsg_atomic()
885 rm->atomic.op_m_fadd.nocarry_mask = args->m_fadd.nocarry_mask; in rds_cmsg_atomic()
888 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic()
889 rm->atomic.op_m_cswp.compare = args->cswp.compare; in rds_cmsg_atomic()
[all …]

12345678910>>...79