blob: 10c3283d6c196b85bcab35264f80851eddcf0663 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/arm/kernel/entry-common.S
3 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; 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 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Russell King6ebbf2c2014-06-30 16:29:12 +010011#include <asm/assembler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <asm/unistd.h>
Abhishek Sagar395a59d2008-06-21 23:47:27 +053013#include <asm/ftrace.h>
Catalin Marinasc4c57162009-02-16 11:42:09 +010014#include <asm/unwind.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
Rob Herring13a50452012-02-07 09:28:22 -060016#ifdef CONFIG_NEED_RET_TO_USER
17#include <mach/entry-macro.S>
18#else
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21#endif
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#include "entry-header.S"
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26 .align 5
Russell King3302cad2015-08-20 16:13:37 +010027#if !(IS_ENABLED(CONFIG_TRACE_IRQFLAGS) || IS_ENABLED(CONFIG_CONTEXT_TRACKING))
Linus Torvalds1da177e2005-04-16 15:20:36 -070028/*
Russell King3302cad2015-08-20 16:13:37 +010029 * This is the fast syscall return path. We do as little as possible here,
30 * such as avoiding writing r0 to the stack. We only use this path if we
31 * have tracing and context tracking disabled - the overheads from those
32 * features make this path too inefficient.
Linus Torvalds1da177e2005-04-16 15:20:36 -070033 */
34ret_fast_syscall:
Catalin Marinasc4c57162009-02-16 11:42:09 +010035 UNWIND(.fnstart )
36 UNWIND(.cantunwind )
Russell King3302cad2015-08-20 16:13:37 +010037 disable_irq_notrace @ disable interrupts
Russell King1b979372015-05-15 11:02:23 +010038 ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
Russell King3302cad2015-08-20 16:13:37 +010039 tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
Linus Torvalds1da177e2005-04-16 15:20:36 -070040 bne fast_work_pending
Russell Kingf4dc9a42005-04-26 15:20:34 +010041
Dan Williamsf80dff92007-02-16 22:16:32 +010042 /* perform architecture specific actions before user return */
43 arch_ret_to_user r1, lr
44
Catalin Marinasb86040a2009-07-24 12:32:54 +010045 restore_user_regs fast = 1, offset = S_OFF
Catalin Marinasc4c57162009-02-16 11:42:09 +010046 UNWIND(.fnend )
Russell King3302cad2015-08-20 16:13:37 +010047ENDPROC(ret_fast_syscall)
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
Russell King3302cad2015-08-20 16:13:37 +010049 /* Ok, we need to do extra processing, enter the slow path. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050fast_work_pending:
51 str r0, [sp, #S_R0+S_OFF]! @ returned r0
Russell King3302cad2015-08-20 16:13:37 +010052 /* fall through to work_pending */
53#else
54/*
55 * The "replacement" ret_fast_syscall for when tracing or context tracking
56 * is enabled. As we will need to call out to some C functions, we save
57 * r0 first to avoid needing to save registers around each C function call.
58 */
59ret_fast_syscall:
60 UNWIND(.fnstart )
61 UNWIND(.cantunwind )
62 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
63 disable_irq_notrace @ disable interrupts
64 ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
65 tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
66 beq no_work_pending
67 UNWIND(.fnend )
68ENDPROC(ret_fast_syscall)
69
70 /* Slower path - fall through to work_pending */
71#endif
72
73 tst r1, #_TIF_SYSCALL_WORK
74 bne __sys_trace_return_nosave
75slow_work_pending:
Linus Torvalds1da177e2005-04-16 15:20:36 -070076 mov r0, sp @ 'regs'
77 mov r2, why @ 'syscall'
Al Viro0a267fa2012-07-19 17:47:55 +010078 bl do_work_pending
Al Viro66285212012-07-19 17:48:50 +010079 cmp r0, #0
Al Viro81783782012-07-19 17:48:21 +010080 beq no_work_pending
Al Viro66285212012-07-19 17:48:50 +010081 movlt scno, #(__NR_restart_syscall - __NR_SYSCALL_BASE)
Al Viro81783782012-07-19 17:48:21 +010082 ldmia sp, {r0 - r6} @ have to reload r0 - r6
83 b local_restart @ ... and off we go
Drew Richardsone83dd372015-08-06 18:50:27 +010084ENDPROC(ret_fast_syscall)
Al Viro81783782012-07-19 17:48:21 +010085
Linus Torvalds1da177e2005-04-16 15:20:36 -070086/*
87 * "slow" syscall return path. "why" tells us if this was a real syscall.
Russell King3302cad2015-08-20 16:13:37 +010088 * IRQs may be enabled here, so always disable them. Note that we use the
89 * "notrace" version to avoid calling into the tracing code unnecessarily.
90 * do_work_pending() will update this state if necessary.
Linus Torvalds1da177e2005-04-16 15:20:36 -070091 */
92ENTRY(ret_to_user)
93ret_slow_syscall:
Russell King3302cad2015-08-20 16:13:37 +010094 disable_irq_notrace @ disable interrupts
Ming Lei9fc25522011-06-05 02:24:58 +010095ENTRY(ret_to_user_from_irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -070096 ldr r1, [tsk, #TI_FLAGS]
97 tst r1, #_TIF_WORK_MASK
Russell King3302cad2015-08-20 16:13:37 +010098 bne slow_work_pending
Linus Torvalds1da177e2005-04-16 15:20:36 -070099no_work_pending:
Russell King3302cad2015-08-20 16:13:37 +0100100 asm_trace_hardirqs_on save = 0
Russell King651e9492013-03-28 11:44:25 +0000101
Dan Williamsf80dff92007-02-16 22:16:32 +0100102 /* perform architecture specific actions before user return */
103 arch_ret_to_user r1, lr
Kevin Hilmanb0088482013-03-28 22:54:40 +0100104 ct_user_enter save = 0
Dan Williamsf80dff92007-02-16 22:16:32 +0100105
Catalin Marinasb86040a2009-07-24 12:32:54 +0100106 restore_user_regs fast = 0, offset = 0
Ming Lei9fc25522011-06-05 02:24:58 +0100107ENDPROC(ret_to_user_from_irq)
Catalin Marinas93ed3972008-08-28 11:22:32 +0100108ENDPROC(ret_to_user)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109
110/*
111 * This is how we return from a fork.
112 */
113ENTRY(ret_from_fork)
114 bl schedule_tail
Al Viro9fff2fa2012-10-10 22:23:29 -0400115 cmp r5, #0
116 movne r0, r4
Russell King14327c62015-04-21 14:17:25 +0100117 badrne lr, 1f
Russell King6ebbf2c2014-06-30 16:29:12 +0100118 retne r5
Russell King68687c82012-10-15 00:16:49 +01001191: get_thread_info tsk
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120 b ret_slow_syscall
Catalin Marinas93ed3972008-08-28 11:22:32 +0100121ENDPROC(ret_from_fork)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122
Al Virofa1b4f92006-01-19 12:57:01 +0000123 .equ NR_syscalls,0
124#define CALL(x) .equ NR_syscalls,NR_syscalls+1
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125#include "calls.S"
Wade Farnsworth1f66e062012-09-07 18:18:25 +0100126
127/*
128 * Ensure that the system call table is equal to __NR_syscalls,
129 * which is the value the rest of the system sees
130 */
131.ifne NR_syscalls - __NR_syscalls
132.error "__NR_syscalls is not equal to the size of the syscall table"
133.endif
134
Al Virofa1b4f92006-01-19 12:57:01 +0000135#undef CALL
136#define CALL(x) .long x
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
138/*=============================================================================
139 * SWI handler
140 *-----------------------------------------------------------------------------
141 */
142
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 .align 5
144ENTRY(vector_swi)
Uwe Kleine-König19c4d592010-05-21 18:06:42 +0100145#ifdef CONFIG_CPU_V7M
146 v7m_exception_entry
147#else
Russell King5745eef62016-05-10 16:34:27 +0100148 sub sp, sp, #PT_REGS_SIZE
Russell Kingf4dc9a42005-04-26 15:20:34 +0100149 stmia sp, {r0 - r12} @ Calling r0 - r12
Catalin Marinasb86040a2009-07-24 12:32:54 +0100150 ARM( add r8, sp, #S_PC )
151 ARM( stmdb r8, {sp, lr}^ ) @ Calling sp, lr
152 THUMB( mov r8, sp )
153 THUMB( store_user_sp_lr r8, r10, S_SP ) @ calling sp, lr
Russell Kingf4dc9a42005-04-26 15:20:34 +0100154 mrs r8, spsr @ called from non-FIQ mode, so ok.
155 str lr, [sp, #S_PC] @ Save calling PC
156 str r8, [sp, #S_PSR] @ Save CPSR
157 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
Uwe Kleine-König19c4d592010-05-21 18:06:42 +0100158#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159 zero_fp
Russell King195b58a2014-08-28 13:08:14 +0100160 alignment_trap r10, ip, __cr_alignment
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100161 enable_irq
162 ct_user_exit
163 get_thread_info tsk
164
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100165 /*
166 * Get the system call number.
167 */
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000168
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000169#if defined(CONFIG_OABI_COMPAT)
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000170
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000171 /*
172 * If we have CONFIG_OABI_COMPAT then we need to look at the swi
173 * value to determine if it is an EABI or an old ABI call.
174 */
175#ifdef CONFIG_ARM_THUMB
176 tst r8, #PSR_T_BIT
177 movne r10, #0 @ no thumb OABI emulation
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100178 USER( ldreq r10, [lr, #-4] ) @ get SWI instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000179#else
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100180 USER( ldr r10, [lr, #-4] ) @ get SWI instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000181#endif
Ben Dooks457c2402013-02-12 18:59:57 +0000182 ARM_BE8(rev r10, r10) @ little endian instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000183
184#elif defined(CONFIG_AEABI)
185
186 /*
187 * Pure EABI user space always put syscall number into scno (r7).
188 */
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000189#elif defined(CONFIG_ARM_THUMB)
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000190 /* Legacy ABI only, possibly thumb mode. */
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100191 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs
192 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100193 USER( ldreq scno, [lr, #-4] )
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000194
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100195#else
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000196 /* Legacy ABI only. */
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100197 USER( ldr scno, [lr, #-4] ) @ get SWI instruction
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100198#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199
Russell King2190fed2015-08-20 10:32:02 +0100200 uaccess_disable tbl
201
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000202 adr tbl, sys_call_table @ load syscall table pointer
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000203
204#if defined(CONFIG_OABI_COMPAT)
205 /*
206 * If the swi argument is zero, this is an EABI call and we do nothing.
207 *
208 * If this is an old ABI call, get the syscall number into scno and
209 * get the old ABI syscall table address.
210 */
211 bics r10, r10, #0xff000000
212 eorne scno, r10, #__NR_OABI_SYSCALL_BASE
213 ldrne tbl, =sys_oabi_call_table
214#elif !defined(CONFIG_AEABI)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215 bic scno, scno, #0xff000000 @ mask off SWI op-code
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100216 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000217#endif
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000218
Al Viro81783782012-07-19 17:48:21 +0100219local_restart:
Nicolas Pitre70c70d92010-08-26 15:08:35 -0700220 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000221 stmdb sp!, {r4, r5} @ push fifth and sixth args
Nicolas Pitre70c70d92010-08-26 15:08:35 -0700222
Nathaniel Husted29ef73b2012-01-03 14:23:09 -0500223 tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 bne __sys_trace
225
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 cmp scno, #NR_syscalls @ check upper syscall limit
Russell King14327c62015-04-21 14:17:25 +0100227 badr lr, ret_fast_syscall @ return address
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228 ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
229
230 add r1, sp, #S_OFF
Will Deacond95bc252013-09-19 10:32:20 +01002312: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100232 eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
Will Deacon377747c2013-05-13 19:16:34 +0100233 bcs arm_syscall
Will Deacond95bc252013-09-19 10:32:20 +0100234 mov why, #0 @ no longer a real syscall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700235 b sys_ni_syscall @ not private func
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100236
237#if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI)
238 /*
239 * We failed to handle a fault trying to access the page
240 * containing the swi instruction, but we're not really in a
241 * position to return -EFAULT. Instead, return back to the
242 * instruction and re-enter the user fault handling path trying
243 * to page it in. This will likely result in sending SEGV to the
244 * current task.
245 */
2469001:
247 sub lr, lr, #4
248 str lr, [sp, #S_PC]
249 b ret_fast_syscall
250#endif
Catalin Marinas93ed3972008-08-28 11:22:32 +0100251ENDPROC(vector_swi)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
253 /*
254 * This is the really slow path. We're going to be doing
255 * context switches, and waiting for our parent to respond.
256 */
257__sys_trace:
Will Deaconad722542012-07-06 15:50:14 +0100258 mov r1, scno
259 add r0, sp, #S_OFF
260 bl syscall_trace_enter
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261
Russell King14327c62015-04-21 14:17:25 +0100262 badr lr, __sys_trace_return @ return address
Nicolas Pitre3f471122006-01-14 19:30:04 +0000263 mov scno, r0 @ syscall number (possibly new)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700264 add r1, sp, #S_R0 + S_OFF @ pointer to regs
265 cmp scno, #NR_syscalls @ check upper syscall limit
Will Deaconc7aa00d2012-07-19 17:49:22 +0100266 ldmccia r1, {r0 - r6} @ have to reload r0 - r6
267 stmccia sp, {r4, r5} @ and update the stack args
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268 ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
Kees Cookad75b512012-11-15 22:12:17 +0100269 cmp scno, #-1 @ skip the syscall?
270 bne 2b
271 add sp, sp, #S_OFF @ restore stack
272 b ret_slow_syscall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273
274__sys_trace_return:
275 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
Will Deaconad722542012-07-06 15:50:14 +0100276 mov r0, sp
277 bl syscall_trace_exit
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 b ret_slow_syscall
279
Russell King3302cad2015-08-20 16:13:37 +0100280__sys_trace_return_nosave:
Russell Kinge0aa3a62015-08-20 17:39:32 +0100281 enable_irq_notrace
Russell King3302cad2015-08-20 16:13:37 +0100282 mov r0, sp
283 bl syscall_trace_exit
284 b ret_slow_syscall
285
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286 .align 5
287#ifdef CONFIG_ALIGNMENT_TRAP
288 .type __cr_alignment, #object
289__cr_alignment:
290 .word cr_alignment
291#endif
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000292 .ltorg
293
294/*
295 * This is the syscall table declaration for native ABI syscalls.
296 * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
297 */
298#define ABI(native, compat) native
299#ifdef CONFIG_AEABI
300#define OBSOLETE(syscall) sys_ni_syscall
301#else
302#define OBSOLETE(syscall) syscall
303#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
305 .type sys_call_table, #object
306ENTRY(sys_call_table)
307#include "calls.S"
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000308#undef ABI
309#undef OBSOLETE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700310
311/*============================================================================
312 * Special system call wrappers
313 */
314@ r0 = syscall number
Russell King567bd982005-12-17 15:25:42 +0000315@ r8 = syscall table
Linus Torvalds1da177e2005-04-16 15:20:36 -0700316sys_syscall:
Paul Brook52475932006-05-16 14:25:55 +0100317 bic scno, r0, #__NR_OABI_SYSCALL_BASE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
319 cmpne scno, #NR_syscalls @ check range
320 stmloia sp, {r5, r6} @ shuffle args
321 movlo r0, r1
322 movlo r1, r2
323 movlo r2, r3
324 movlo r3, r4
325 ldrlo pc, [tbl, scno, lsl #2]
326 b sys_ni_syscall
Catalin Marinas93ed3972008-08-28 11:22:32 +0100327ENDPROC(sys_syscall)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329sys_sigreturn_wrapper:
330 add r0, sp, #S_OFF
Al Viro653d48b2010-09-17 14:34:39 +0100331 mov why, #0 @ prevent syscall restart handling
Linus Torvalds1da177e2005-04-16 15:20:36 -0700332 b sys_sigreturn
Catalin Marinas93ed3972008-08-28 11:22:32 +0100333ENDPROC(sys_sigreturn_wrapper)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700334
335sys_rt_sigreturn_wrapper:
336 add r0, sp, #S_OFF
Al Viro653d48b2010-09-17 14:34:39 +0100337 mov why, #0 @ prevent syscall restart handling
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338 b sys_rt_sigreturn
Catalin Marinas93ed3972008-08-28 11:22:32 +0100339ENDPROC(sys_rt_sigreturn_wrapper)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700340
Nicolas Pitre713c4812006-01-14 16:35:03 +0000341sys_statfs64_wrapper:
342 teq r1, #88
343 moveq r1, #84
344 b sys_statfs64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100345ENDPROC(sys_statfs64_wrapper)
Nicolas Pitre713c4812006-01-14 16:35:03 +0000346
347sys_fstatfs64_wrapper:
348 teq r1, #88
349 moveq r1, #84
350 b sys_fstatfs64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100351ENDPROC(sys_fstatfs64_wrapper)
Nicolas Pitre713c4812006-01-14 16:35:03 +0000352
Linus Torvalds1da177e2005-04-16 15:20:36 -0700353/*
354 * Note: off_4k (r5) is always units of 4K. If we can't do the requested
355 * offset, we return EINVAL.
356 */
357sys_mmap2:
358#if PAGE_SHIFT > 12
359 tst r5, #PGOFF_MASK
360 moveq r5, r5, lsr #PAGE_SHIFT - 12
361 streq r5, [sp, #4]
Al Virof8b72562009-11-30 17:37:04 -0500362 beq sys_mmap_pgoff
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363 mov r0, #-EINVAL
Russell King6ebbf2c2014-06-30 16:29:12 +0100364 ret lr
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365#else
366 str r5, [sp, #4]
Al Virof8b72562009-11-30 17:37:04 -0500367 b sys_mmap_pgoff
Linus Torvalds1da177e2005-04-16 15:20:36 -0700368#endif
Catalin Marinas93ed3972008-08-28 11:22:32 +0100369ENDPROC(sys_mmap2)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000370
371#ifdef CONFIG_OABI_COMPAT
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000372
Nicolas Pitre687ad012006-01-14 16:35:31 +0000373/*
374 * These are syscalls with argument register differences
375 */
376
377sys_oabi_pread64:
378 stmia sp, {r3, r4}
379 b sys_pread64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100380ENDPROC(sys_oabi_pread64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000381
382sys_oabi_pwrite64:
383 stmia sp, {r3, r4}
384 b sys_pwrite64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100385ENDPROC(sys_oabi_pwrite64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000386
387sys_oabi_truncate64:
388 mov r3, r2
389 mov r2, r1
390 b sys_truncate64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100391ENDPROC(sys_oabi_truncate64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000392
393sys_oabi_ftruncate64:
394 mov r3, r2
395 mov r2, r1
396 b sys_ftruncate64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100397ENDPROC(sys_oabi_ftruncate64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000398
399sys_oabi_readahead:
400 str r3, [sp]
401 mov r3, r2
402 mov r2, r1
403 b sys_readahead
Catalin Marinas93ed3972008-08-28 11:22:32 +0100404ENDPROC(sys_oabi_readahead)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000405
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000406/*
407 * Let's declare a second syscall table for old ABI binaries
408 * using the compatibility syscall entries.
409 */
410#define ABI(native, compat) compat
411#define OBSOLETE(syscall) syscall
412
413 .type sys_oabi_call_table, #object
414ENTRY(sys_oabi_call_table)
415#include "calls.S"
416#undef ABI
417#undef OBSOLETE
418
Nicolas Pitre687ad012006-01-14 16:35:31 +0000419#endif
420