tools/arch/riscv/include/asm/fence.h
raw| 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 */ |