Linux 4.19.133
[linux/fpc-iii.git] / tools / arch / mips / include / asm / barrier.h
blob0d1191523cd0d812b15f80b65f14e72b9dcdbdf4
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H
3 #define _TOOLS_LINUX_ASM_MIPS_BARRIER_H
4 /*
5 * FIXME: This came from tools/perf/perf-sys.h, where it was first introduced
6 * in c1e028ef40b8d6943b767028ba17d4f2ba020edb, more work needed to make it
7 * more closely follow the Linux kernel arch/mips/include/asm/barrier.h file.
8 * Probably when we continue work on tools/ Kconfig support to have all the
9 * CONFIG_ needed for properly doing that.
11 #define mb() asm volatile( \
12 ".set mips2\n\t" \
13 "sync\n\t" \
14 ".set mips0" \
15 : /* no output */ \
16 : /* no input */ \
17 : "memory")
18 #define wmb() mb()
19 #define rmb() mb()
21 #endif /* _TOOLS_LINUX_ASM_MIPS_BARRIER_H */