2 * Compat system call wrappers
4 * Copyright (C) 2012 ARM Ltd.
5 * Authors: Will Deacon <will.deacon@arm.com>
6 * Catalin Marinas <catalin.marinas@arm.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <linux/linkage.h>
23 #include <asm/assembler.h>
24 #include <asm/asm-offsets.h>
27 * System call wrappers for the AArch32 compatibility layer.
30 ENTRY(compat_sys_sigreturn_wrapper)
32 mov x27, #0 // prevent syscall restart handling (why)
33 b compat_sys_sigreturn
34 ENDPROC(compat_sys_sigreturn_wrapper)
36 ENTRY(compat_sys_rt_sigreturn_wrapper)
38 mov x27, #0 // prevent syscall restart handling (why)
39 b compat_sys_rt_sigreturn
40 ENDPROC(compat_sys_rt_sigreturn_wrapper)
42 ENTRY(compat_sys_statfs64_wrapper)
47 ENDPROC(compat_sys_statfs64_wrapper)
49 ENTRY(compat_sys_fstatfs64_wrapper)
53 b compat_sys_fstatfs64
54 ENDPROC(compat_sys_fstatfs64_wrapper)
57 * Wrappers for AArch32 syscalls that either take 64-bit parameters
58 * in registers or that take 32-bit parameters which require sign
61 ENTRY(compat_sys_pread64_wrapper)
64 ENDPROC(compat_sys_pread64_wrapper)
66 ENTRY(compat_sys_pwrite64_wrapper)
69 ENDPROC(compat_sys_pwrite64_wrapper)
71 ENTRY(compat_sys_truncate64_wrapper)
74 ENDPROC(compat_sys_truncate64_wrapper)
76 ENTRY(compat_sys_ftruncate64_wrapper)
79 ENDPROC(compat_sys_ftruncate64_wrapper)
81 ENTRY(compat_sys_readahead_wrapper)
85 ENDPROC(compat_sys_readahead_wrapper)
87 ENTRY(compat_sys_fadvise64_64_wrapper)
93 ENDPROC(compat_sys_fadvise64_64_wrapper)
95 ENTRY(compat_sys_sync_file_range2_wrapper)
98 b sys_sync_file_range2
99 ENDPROC(compat_sys_sync_file_range2_wrapper)
101 ENTRY(compat_sys_fallocate_wrapper)
102 regs_to_64 x2, x2, x3
103 regs_to_64 x3, x4, x5
105 ENDPROC(compat_sys_fallocate_wrapper)