Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H
0003 #define _TOOLS_LINUX_ASM_MIPS_BARRIER_H
0004 /*
0005  * FIXME: This came from tools/perf/perf-sys.h, where it was first introduced
0006  * in c1e028ef40b8d6943b767028ba17d4f2ba020edb, more work needed to make it
0007  * more closely follow the Linux kernel arch/mips/include/asm/barrier.h file.
0008  * Probably when we continue work on tools/ Kconfig support to have all the
0009  * CONFIG_ needed for properly doing that.
0010  */
0011 #define mb()        asm volatile(                   \
0012                 ".set   mips2\n\t"          \
0013                 "sync\n\t"              \
0014                 ".set   mips0"              \
0015                 : /* no output */           \
0016                 : /* no input */            \
0017                 : "memory")
0018 #define wmb()   mb()
0019 #define rmb()   mb()
0020 
0021 #endif /* _TOOLS_LINUX_ASM_MIPS_BARRIER_H */