xref: /linux/arch/riscv/kernel/compat_syscall_table.c (revision 3db80c999debbadd5d627fb30f8b06fee331ffb6)
159c10c52SGuo Ren // SPDX-License-Identifier: GPL-2.0-only
259c10c52SGuo Ren 
359c10c52SGuo Ren #define __SYSCALL_COMPAT
459c10c52SGuo Ren 
559c10c52SGuo Ren #include <linux/compat.h>
659c10c52SGuo Ren #include <linux/syscalls.h>
759c10c52SGuo Ren #include <asm-generic/mman-common.h>
859c10c52SGuo Ren #include <asm-generic/syscalls.h>
959c10c52SGuo Ren #include <asm/syscall.h>
1059c10c52SGuo Ren 
11*3db80c99SArnd Bergmann #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
12*3db80c99SArnd Bergmann 
1359c10c52SGuo Ren #undef __SYSCALL
1408d0ce30SSami Tolvanen #define __SYSCALL(nr, call)	asmlinkage long __riscv_##call(const struct pt_regs *);
15*3db80c99SArnd Bergmann #include <asm/syscall_table_32.h>
1608d0ce30SSami Tolvanen 
1708d0ce30SSami Tolvanen #undef __SYSCALL
1808d0ce30SSami Tolvanen #define __SYSCALL(nr, call)      [nr] = __riscv_##call,
1959c10c52SGuo Ren 
2059c10c52SGuo Ren asmlinkage long compat_sys_rt_sigreturn(void);
2159c10c52SGuo Ren 
2259c10c52SGuo Ren void * const compat_sys_call_table[__NR_syscalls] = {
2308d0ce30SSami Tolvanen 	[0 ... __NR_syscalls - 1] = __riscv_sys_ni_syscall,
24*3db80c99SArnd Bergmann #include <asm/syscall_table_32.h>
2559c10c52SGuo Ren };
26