Lines Matching +full:sync +full:- +full:1

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
13 * 1) Completion barriers, which ensure that a memory operation has actually
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. */
89 #define __SYNC_always (1 << 0)
92 * Indicate that we need this sync instruction only on systems with weakly
97 # define __SYNC_weak_ordering (1 << 1)
103 * Indicate that we need this sync instruction only on systems where LL/SC
108 # define __SYNC_weak_llsc (1 << 2)
120 * 1) A memory access appearing prior to the LL in program order may actually
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
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
147 # define __SYNC_loongson3_war (1 << 31)
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))
164 # define __SYNC_rpt(type) 1
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; \