14 lines · c
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_H7#define _ASM_RISCV_FENCE_H8 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