sys32.c 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * arch/arm64/kernel/sys32.c
 *
 * Copyright (C) 2015 ARM Ltd.
 *
 * This program is free software(void); you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http(void);//www.gnu.org/licenses/>.
 */

/*
 * Needed to avoid conflicting __NR_* macros between uapi/asm/unistd.h and
 * asm/unistd32.h.
 */
#define __COMPAT_SYSCALL_NR

#include <linux/compiler.h>
#include <linux/syscalls.h>

M
Mark Rutland 已提交
28 29
#include <asm/syscall.h>

M
Mark Rutland 已提交
30 31
asmlinkage long compat_sys_sigreturn(void);
asmlinkage long compat_sys_rt_sigreturn(void);
32 33 34 35 36 37 38 39 40 41
asmlinkage long compat_sys_statfs64_wrapper(void);
asmlinkage long compat_sys_fstatfs64_wrapper(void);
asmlinkage long compat_sys_pread64_wrapper(void);
asmlinkage long compat_sys_pwrite64_wrapper(void);
asmlinkage long compat_sys_truncate64_wrapper(void);
asmlinkage long compat_sys_ftruncate64_wrapper(void);
asmlinkage long compat_sys_readahead_wrapper(void);
asmlinkage long compat_sys_fadvise64_64_wrapper(void);
asmlinkage long compat_sys_sync_file_range2_wrapper(void);
asmlinkage long compat_sys_fallocate_wrapper(void);
42
asmlinkage long compat_sys_mmap2_wrapper(void);
43 44

#undef __SYSCALL
M
Mark Rutland 已提交
45
#define __SYSCALL(nr, sym)	[nr] = (syscall_fn_t)sym,
46 47 48 49 50

/*
 * The sys_call_table array must be 4K aligned to be accessible from
 * kernel/entry.S.
 */
M
Mark Rutland 已提交
51 52
const syscall_fn_t compat_sys_call_table[__NR_compat_syscalls] __aligned(4096) = {
	[0 ... __NR_compat_syscalls - 1] = (syscall_fn_t)sys_ni_syscall,
53 54
#include <asm/unistd32.h>
};