| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2017 SiFive |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <linux/linkage.h> |
| 7 |
#include <asm/unistd.h> |
| 8 |
#include <asm/assembler.h> |
| 9 |
|
| 10 |
.text |
| 11 |
/* int __vdso_flush_icache(void *start, void *end, unsigned long flags); */ |
| 12 |
SYM_FUNC_START(__vdso_flush_icache) |
| 13 |
.cfi_startproc |
| 14 |
vdso_lpad |
| 15 |
#ifdef CONFIG_SMP |
| 16 |
li a7, __NR_riscv_flush_icache |
| 17 |
ecall |
| 18 |
#else |
| 19 |
fence.i |
| 20 |
li a0, 0 |
| 21 |
#endif |
| 22 |
ret |
| 23 |
.cfi_endproc |
| 24 |
SYM_FUNC_END(__vdso_flush_icache) |
| 25 |
|
| 26 |
emit_riscv_feature_1_and |