blob: 7a7fce63c4744a04c70d5c977a8acfd959cf87ac [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2012 ARM Limited
4 * Copyright (C) 2014 Regents of the University of California
5 * Copyright (C) 2017 SiFive
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
7
8#ifndef _ASM_RISCV_VDSO_H
9#define _ASM_RISCV_VDSO_H
10
11#include <linux/types.h>
12
13struct vdso_data {
14};
15
16/*
17 * The VDSO symbols are mapped into Linux so we can just use regular symbol
18 * addressing to get their offsets in userspace. The symbols are mapped at an
19 * offset of 0, but since the linker must support setting weak undefined
20 * symbols to the absolute address 0 it also happens to support other low
21 * addresses even when the code model suggests those low addresses would not
22 * otherwise be availiable.
23 */
24#define VDSO_SYMBOL(base, name) \
25({ \
26 extern const char __vdso_##name[]; \
27 (void __user *)((unsigned long)(base) + __vdso_##name); \
28})
29
30asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t);
31
32#endif /* _ASM_RISCV_VDSO_H */