Lines Matching +full:sync +full:- +full:2

1 /* SPDX-License-Identifier: GPL-2.0-only */
6 * sync types are defined by the MIPS64 Instruction Set documentation in Volume
7 * II-A of the MIPS Architecture Reference Manual, which can be found here:
9 * https://www.mips.com/?do-download=the-mips64-instruction-set-v6-06
16 * 2) Ordering barriers, which only ensure that affected memory operations
27 * actually need to complete - they just need to get far enough that all
43 * No sync instruction at all; used to allow code to nullify the effect of the
46 #define __SYNC_none -1
49 * A full completion barrier; all memory accesses appearing prior to this sync
51 * appearing after this sync instruction in program order.
56 * For now we use a full completion barrier to implement all sync types, until
78 * A GINV sync is a little different; it doesn't relate directly to loads or
82 * has been performed by all coherent CPUs, we must issue a sync instruction of
88 /* Trivial; indicate that we always need this sync instruction. */
92 * Indicate that we need this sync instruction only on systems with weakly
103 * Indicate that we need this sync instruction only on systems where LL/SC
108 # define __SYNC_weak_llsc (1 << 2)
121 * be executed after the LL - this is the reordering case.
123 * In order to avoid this we need to place a memory barrier (ie. a SYNC
129 * 2) If a conditional branch exists between an LL & SC with a target outside
130 * of the LL-SC loop, for example an exit upon value mismatch in cmpxchg()
132 * execution of memory accesses from outside of the LL-SC loop.
134 * In order to avoid this we need a memory barrier (ie. a SYNC instruction)
140 * such that the Invalidate of a competing LL-SC goes 'missing' and SC
154 * barrier to be ineffective, requiring the use of 2 in sequence to provide an
157 * sync instructions should be emitted twice.
159 * and that the assembler evaluates '==' as 0 or -1, not 0 or 1.
162 # define __SYNC_rpt(type) (1 - (type == __SYNC_wmb))
168 * The main event. Here we actually emit a sync instruction of a given type, if
169 * reason is non-zero.
171 * In future we have the option of emitting entries in a fixups-style table
172 * here that would allow us to opportunistically remove some sync instructions
178 .if (( _type ) != -1) && ( _reason ); \
182 sync _type; \