xref: /OK3568_Linux_fs/kernel/tools/arch/xtensa/include/asm/barrier.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copied from the kernel sources to tools/:
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
5*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
6*4882a593Smuzhiyun  * for more details.
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * Copyright (C) 2001 - 2012 Tensilica Inc.
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #ifndef _TOOLS_LINUX_XTENSA_SYSTEM_H
12*4882a593Smuzhiyun #define _TOOLS_LINUX_XTENSA_SYSTEM_H
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #define mb()  ({ __asm__ __volatile__("memw" : : : "memory"); })
15*4882a593Smuzhiyun #define rmb() barrier()
16*4882a593Smuzhiyun #define wmb() mb()
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #endif /* _TOOLS_LINUX_XTENSA_SYSTEM_H */
19