2 * Copyright (C) 2012 ARM Limited
3 * Copyright (C) 2014 Regents of the University of California
4 * Copyright (C) 2017 SiFive
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _ASM_RISCV_VDSO_H
20 #define _ASM_RISCV_VDSO_H
22 #include <linux/types.h>
28 * The VDSO symbols are mapped into Linux so we can just use regular symbol
29 * addressing to get their offsets in userspace. The symbols are mapped at an
30 * offset of 0, but since the linker must support setting weak undefined
31 * symbols to the absolute address 0 it also happens to support other low
32 * addresses even when the code model suggests those low addresses would not
33 * otherwise be availiable.
35 #define VDSO_SYMBOL(base, name) \
37 extern const char __vdso_##name[]; \
38 (void __user *)((unsigned long)(base) + __vdso_##name); \
42 asmlinkage
long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t);
45 #endif /* _ASM_RISCV_VDSO_H */