xref: /OK3568_Linux_fs/kernel/arch/nds32/include/asm/barrier.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun // Copyright (C) 2005-2017 Andes Technology Corporation
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun #ifndef __NDS32_ASM_BARRIER_H
5*4882a593Smuzhiyun #define __NDS32_ASM_BARRIER_H
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef __ASSEMBLY__
8*4882a593Smuzhiyun #define mb()		asm volatile("msync all":::"memory")
9*4882a593Smuzhiyun #define rmb()		asm volatile("msync all":::"memory")
10*4882a593Smuzhiyun #define wmb()		asm volatile("msync store":::"memory")
11*4882a593Smuzhiyun #include <asm-generic/barrier.h>
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #endif	/* __ASSEMBLY__ */
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #endif	/* __NDS32_ASM_BARRIER_H */
16