blob: a40b1343b819f86bdf4a0e80f143a12425f8fd6b [file] [log] [blame]
Catalin Marinas01564112015-01-06 16:42:32 +00001/*
2 * arch/arm64/kernel/sys32.c
3 *
4 * Copyright (C) 2015 ARM Ltd.
5 *
6 * This program is free software(void); 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(void);//www.gnu.org/licenses/>.
17 */
18
19/*
20 * Needed to avoid conflicting __NR_* macros between uapi/asm/unistd.h and
21 * asm/unistd32.h.
22 */
23#define __COMPAT_SYSCALL_NR
24
25#include <linux/compiler.h>
26#include <linux/syscalls.h>
27
28asmlinkage long compat_sys_sigreturn_wrapper(void);
29asmlinkage long compat_sys_rt_sigreturn_wrapper(void);
30asmlinkage long compat_sys_statfs64_wrapper(void);
31asmlinkage long compat_sys_fstatfs64_wrapper(void);
32asmlinkage long compat_sys_pread64_wrapper(void);
33asmlinkage long compat_sys_pwrite64_wrapper(void);
34asmlinkage long compat_sys_truncate64_wrapper(void);
35asmlinkage long compat_sys_ftruncate64_wrapper(void);
36asmlinkage long compat_sys_readahead_wrapper(void);
37asmlinkage long compat_sys_fadvise64_64_wrapper(void);
38asmlinkage long compat_sys_sync_file_range2_wrapper(void);
39asmlinkage long compat_sys_fallocate_wrapper(void);
Andreas Schwab18ccb0c2015-03-16 16:32:22 +000040asmlinkage long compat_sys_mmap2_wrapper(void);
Catalin Marinas01564112015-01-06 16:42:32 +000041
42#undef __SYSCALL
43#define __SYSCALL(nr, sym) [nr] = sym,
44
45/*
46 * The sys_call_table array must be 4K aligned to be accessible from
47 * kernel/entry.S.
48 */
49void * const compat_sys_call_table[__NR_compat_syscalls] __aligned(4096) = {
50 [0 ... __NR_compat_syscalls - 1] = sys_ni_syscall,
51#include <asm/unistd32.h>
52};