xref: /OK3568_Linux_fs/kernel/arch/riscv/include/asm/mmiowb.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun 
3*4882a593Smuzhiyun #ifndef _ASM_RISCV_MMIOWB_H
4*4882a593Smuzhiyun #define _ASM_RISCV_MMIOWB_H
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun /*
7*4882a593Smuzhiyun  * "o,w" is sufficient to ensure that all writes to the device have completed
8*4882a593Smuzhiyun  * before the write to the spinlock is allowed to commit.
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun #define mmiowb()	__asm__ __volatile__ ("fence o,w" : : : "memory");
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/smp.h>
13*4882a593Smuzhiyun #include <asm-generic/mmiowb.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #endif	/* _ASM_RISCV_MMIOWB_H */
16