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. 10 */ 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() 20 21#endif /* _TOOLS_LINUX_ASM_MIPS_BARRIER_H */ 22