xref: /linux/tools/arch/riscv/include/asm/fence.h (revision 83e445e64f48bdae3f25013e788fcf592f142576)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copied from the kernel sources to tools/arch/riscv:
4  */
5 
6 #ifndef _ASM_RISCV_FENCE_H
7 #define _ASM_RISCV_FENCE_H
8 
9 #define RISCV_FENCE_ASM(p, s)		"\tfence " #p "," #s "\n"
10 #define RISCV_FENCE(p, s) \
11 	({ __asm__ __volatile__ (RISCV_FENCE_ASM(p, s) : : : "memory"); })
12 
13 #endif	/* _ASM_RISCV_FENCE_H */
14