aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/module.h1
-rw-r--r--arch/riscv/include/asm/uaccess.h4
-rw-r--r--arch/riscv/include/asm/unistd.h5
-rw-r--r--arch/riscv/include/uapi/asm/unistd.h (renamed from arch/riscv/include/uapi/asm/syscalls.h)26
4 files changed, 24 insertions, 12 deletions
diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
index 349df33808c4..cd2af4b013e3 100644
--- a/arch/riscv/include/asm/module.h
+++ b/arch/riscv/include/asm/module.h
@@ -8,6 +8,7 @@
8 8
9#define MODULE_ARCH_VERMAGIC "riscv" 9#define MODULE_ARCH_VERMAGIC "riscv"
10 10
11struct module;
11u64 module_emit_got_entry(struct module *mod, u64 val); 12u64 module_emit_got_entry(struct module *mod, u64 val);
12u64 module_emit_plt_entry(struct module *mod, u64 val); 13u64 module_emit_plt_entry(struct module *mod, u64 val);
13 14
diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h
index 473cfc84e412..8c3e3e3c8be1 100644
--- a/arch/riscv/include/asm/uaccess.h
+++ b/arch/riscv/include/asm/uaccess.h
@@ -400,13 +400,13 @@ extern unsigned long __must_check __asm_copy_from_user(void *to,
400static inline unsigned long 400static inline unsigned long
401raw_copy_from_user(void *to, const void __user *from, unsigned long n) 401raw_copy_from_user(void *to, const void __user *from, unsigned long n)
402{ 402{
403 return __asm_copy_to_user(to, from, n); 403 return __asm_copy_from_user(to, from, n);
404} 404}
405 405
406static inline unsigned long 406static inline unsigned long
407raw_copy_to_user(void __user *to, const void *from, unsigned long n) 407raw_copy_to_user(void __user *to, const void *from, unsigned long n)
408{ 408{
409 return __asm_copy_from_user(to, from, n); 409 return __asm_copy_to_user(to, from, n);
410} 410}
411 411
412extern long strncpy_from_user(char *dest, const char __user *src, long count); 412extern long strncpy_from_user(char *dest, const char __user *src, long count);
diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index eff7aa9aa163..fef96f117b4d 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -13,10 +13,9 @@
13 13
14/* 14/*
15 * There is explicitly no include guard here because this file is expected to 15 * There is explicitly no include guard here because this file is expected to
16 * be included multiple times. See uapi/asm/syscalls.h for more info. 16 * be included multiple times.
17 */ 17 */
18 18
19#define __ARCH_WANT_NEW_STAT
20#define __ARCH_WANT_SYS_CLONE 19#define __ARCH_WANT_SYS_CLONE
20
21#include <uapi/asm/unistd.h> 21#include <uapi/asm/unistd.h>
22#include <uapi/asm/syscalls.h>
diff --git a/arch/riscv/include/uapi/asm/syscalls.h b/arch/riscv/include/uapi/asm/unistd.h
index 206dc4b0f6ea..1f3bd3ebbb0d 100644
--- a/arch/riscv/include/uapi/asm/syscalls.h
+++ b/arch/riscv/include/uapi/asm/unistd.h
@@ -1,13 +1,25 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * Copyright (C) 2017-2018 SiFive 3 * Copyright (C) 2018 David Abdurachmanov <david.abdurachmanov@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4 */ 16 */
5 17
6/* 18#ifdef __LP64__
7 * There is explicitly no include guard here because this file is expected to 19#define __ARCH_WANT_NEW_STAT
8 * be included multiple times in order to define the syscall macros via 20#endif /* __LP64__ */
9 * __SYSCALL. 21
10 */ 22#include <asm-generic/unistd.h>
11 23
12/* 24/*
13 * Allows the instruction cache to be flushed from userspace. Despite RISC-V 25 * Allows the instruction cache to be flushed from userspace. Despite RISC-V