blob: 541544d64c33b2f95a0d2f3a1f7f3e80498ea006 [file] [log] [blame]
Palmer Dabbelte2c0cdf2017-07-10 18:07:09 -07001/*
2 * Copyright (C) 2012 ARM Limited
3 * Copyright (C) 2014 Regents of the University of California
4 * Copyright (C) 2017 SiFive
5 *
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.
9 *
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.
14 *
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/>.
17 */
18
19#ifndef _ASM_RISCV_VDSO_H
20#define _ASM_RISCV_VDSO_H
21
22#include <linux/types.h>
23
24struct vdso_data {
25};
26
27/*
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.
34 */
35#define VDSO_SYMBOL(base, name) \
36({ \
37 extern const char __vdso_##name[]; \
38 (void __user *)((unsigned long)(base) + __vdso_##name); \
39})
40
Andrew Waterman921ebd82017-10-25 14:32:16 -070041#ifdef CONFIG_SMP
42asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t);
43#endif
44
Palmer Dabbelte2c0cdf2017-07-10 18:07:09 -070045#endif /* _ASM_RISCV_VDSO_H */