blob: d69adfb3d79e64d5d47b445569598d88d50ecb2a [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:
Vincent Whitchurch88bc59c2018-07-13 11:12:22 +010035__ret_fast_syscall:
Catalin Marinasc4c57162009-02-16 11:42:09 +010036 UNWIND(.fnstart )
37 UNWIND(.cantunwind )
Russell King3302cad2015-08-20 16:13:37 +010038 disable_irq_notrace @ disable interrupts
Russell King1b979372015-05-15 11:02:23 +010039 ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
Russell King3302cad2015-08-20 16:13:37 +010040 tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 bne fast_work_pending
Russell Kingf4dc9a42005-04-26 15:20:34 +010042
Dan Williamsf80dff92007-02-16 22:16:32 +010043 /* perform architecture specific actions before user return */
44 arch_ret_to_user r1, lr
45
Catalin Marinasb86040a2009-07-24 12:32:54 +010046 restore_user_regs fast = 1, offset = S_OFF
Catalin Marinasc4c57162009-02-16 11:42:09 +010047 UNWIND(.fnend )
Russell King3302cad2015-08-20 16:13:37 +010048ENDPROC(ret_fast_syscall)
Linus Torvalds1da177e2005-04-16 15:20:36 -070049
Russell King3302cad2015-08-20 16:13:37 +010050 /* Ok, we need to do extra processing, enter the slow path. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070051fast_work_pending:
52 str r0, [sp, #S_R0+S_OFF]! @ returned r0
Russell King3302cad2015-08-20 16:13:37 +010053 /* fall through to work_pending */
54#else
55/*
56 * The "replacement" ret_fast_syscall for when tracing or context tracking
57 * is enabled. As we will need to call out to some C functions, we save
58 * r0 first to avoid needing to save registers around each C function call.
59 */
60ret_fast_syscall:
Vincent Whitchurch88bc59c2018-07-13 11:12:22 +010061__ret_fast_syscall:
Russell King3302cad2015-08-20 16:13:37 +010062 UNWIND(.fnstart )
63 UNWIND(.cantunwind )
64 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
65 disable_irq_notrace @ disable interrupts
66 ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
67 tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
68 beq no_work_pending
69 UNWIND(.fnend )
70ENDPROC(ret_fast_syscall)
71
72 /* Slower path - fall through to work_pending */
73#endif
74
75 tst r1, #_TIF_SYSCALL_WORK
76 bne __sys_trace_return_nosave
77slow_work_pending:
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 mov r0, sp @ 'regs'
79 mov r2, why @ 'syscall'
Al Viro0a267fa2012-07-19 17:47:55 +010080 bl do_work_pending
Al Viro66285212012-07-19 17:48:50 +010081 cmp r0, #0
Al Viro81783782012-07-19 17:48:21 +010082 beq no_work_pending
Al Viro66285212012-07-19 17:48:50 +010083 movlt scno, #(__NR_restart_syscall - __NR_SYSCALL_BASE)
Al Viro81783782012-07-19 17:48:21 +010084 ldmia sp, {r0 - r6} @ have to reload r0 - r6
85 b local_restart @ ... and off we go
Drew Richardsone83dd372015-08-06 18:50:27 +010086ENDPROC(ret_fast_syscall)
Al Viro81783782012-07-19 17:48:21 +010087
Linus Torvalds1da177e2005-04-16 15:20:36 -070088/*
89 * "slow" syscall return path. "why" tells us if this was a real syscall.
Russell King3302cad2015-08-20 16:13:37 +010090 * IRQs may be enabled here, so always disable them. Note that we use the
91 * "notrace" version to avoid calling into the tracing code unnecessarily.
92 * do_work_pending() will update this state if necessary.
Linus Torvalds1da177e2005-04-16 15:20:36 -070093 */
94ENTRY(ret_to_user)
95ret_slow_syscall:
Russell King3302cad2015-08-20 16:13:37 +010096 disable_irq_notrace @ disable interrupts
Ming Lei9fc25522011-06-05 02:24:58 +010097ENTRY(ret_to_user_from_irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -070098 ldr r1, [tsk, #TI_FLAGS]
99 tst r1, #_TIF_WORK_MASK
Russell King3302cad2015-08-20 16:13:37 +0100100 bne slow_work_pending
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101no_work_pending:
Russell King3302cad2015-08-20 16:13:37 +0100102 asm_trace_hardirqs_on save = 0
Russell King651e9492013-03-28 11:44:25 +0000103
Dan Williamsf80dff92007-02-16 22:16:32 +0100104 /* perform architecture specific actions before user return */
105 arch_ret_to_user r1, lr
Kevin Hilmanb0088482013-03-28 22:54:40 +0100106 ct_user_enter save = 0
Dan Williamsf80dff92007-02-16 22:16:32 +0100107
Catalin Marinasb86040a2009-07-24 12:32:54 +0100108 restore_user_regs fast = 0, offset = 0
Ming Lei9fc25522011-06-05 02:24:58 +0100109ENDPROC(ret_to_user_from_irq)
Catalin Marinas93ed3972008-08-28 11:22:32 +0100110ENDPROC(ret_to_user)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111
112/*
113 * This is how we return from a fork.
114 */
115ENTRY(ret_from_fork)
116 bl schedule_tail
Al Viro9fff2fa2012-10-10 22:23:29 -0400117 cmp r5, #0
118 movne r0, r4
Russell King14327c62015-04-21 14:17:25 +0100119 badrne lr, 1f
Russell King6ebbf2c2014-06-30 16:29:12 +0100120 retne r5
Russell King68687c82012-10-15 00:16:49 +01001211: get_thread_info tsk
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122 b ret_slow_syscall
Catalin Marinas93ed3972008-08-28 11:22:32 +0100123ENDPROC(ret_from_fork)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124
Al Virofa1b4f92006-01-19 12:57:01 +0000125 .equ NR_syscalls,0
126#define CALL(x) .equ NR_syscalls,NR_syscalls+1
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127#include "calls.S"
Wade Farnsworth1f66e062012-09-07 18:18:25 +0100128
129/*
130 * Ensure that the system call table is equal to __NR_syscalls,
131 * which is the value the rest of the system sees
132 */
133.ifne NR_syscalls - __NR_syscalls
134.error "__NR_syscalls is not equal to the size of the syscall table"
135.endif
136
Al Virofa1b4f92006-01-19 12:57:01 +0000137#undef CALL
138#define CALL(x) .long x
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139
140/*=============================================================================
141 * SWI handler
142 *-----------------------------------------------------------------------------
143 */
144
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145 .align 5
146ENTRY(vector_swi)
Uwe Kleine-König19c4d592010-05-21 18:06:42 +0100147#ifdef CONFIG_CPU_V7M
148 v7m_exception_entry
149#else
Russell King5745eef2016-05-10 16:34:27 +0100150 sub sp, sp, #PT_REGS_SIZE
Russell Kingf4dc9a42005-04-26 15:20:34 +0100151 stmia sp, {r0 - r12} @ Calling r0 - r12
Catalin Marinasb86040a2009-07-24 12:32:54 +0100152 ARM( add r8, sp, #S_PC )
153 ARM( stmdb r8, {sp, lr}^ ) @ Calling sp, lr
154 THUMB( mov r8, sp )
155 THUMB( store_user_sp_lr r8, r10, S_SP ) @ calling sp, lr
Russell Kingf4dc9a42005-04-26 15:20:34 +0100156 mrs r8, spsr @ called from non-FIQ mode, so ok.
157 str lr, [sp, #S_PC] @ Save calling PC
158 str r8, [sp, #S_PSR] @ Save CPSR
159 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
Uwe Kleine-König19c4d592010-05-21 18:06:42 +0100160#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 zero_fp
Russell King195b58a2014-08-28 13:08:14 +0100162 alignment_trap r10, ip, __cr_alignment
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100163 enable_irq
164 ct_user_exit
165 get_thread_info tsk
166
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100167 /*
168 * Get the system call number.
169 */
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000170
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000171#if defined(CONFIG_OABI_COMPAT)
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000172
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000173 /*
174 * If we have CONFIG_OABI_COMPAT then we need to look at the swi
175 * value to determine if it is an EABI or an old ABI call.
176 */
177#ifdef CONFIG_ARM_THUMB
178 tst r8, #PSR_T_BIT
179 movne r10, #0 @ no thumb OABI emulation
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100180 USER( ldreq r10, [lr, #-4] ) @ get SWI instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000181#else
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100182 USER( ldr r10, [lr, #-4] ) @ get SWI instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000183#endif
Ben Dooks457c2402013-02-12 18:59:57 +0000184 ARM_BE8(rev r10, r10) @ little endian instruction
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000185
186#elif defined(CONFIG_AEABI)
187
188 /*
189 * Pure EABI user space always put syscall number into scno (r7).
190 */
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000191#elif defined(CONFIG_ARM_THUMB)
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000192 /* Legacy ABI only, possibly thumb mode. */
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100193 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs
194 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100195 USER( ldreq scno, [lr, #-4] )
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000196
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100197#else
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000198 /* Legacy ABI only. */
Will Deacon1aa2b3b2013-06-05 11:25:13 +0100199 USER( ldr scno, [lr, #-4] ) @ get SWI instruction
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100200#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
Russell King2190fed2015-08-20 10:32:02 +0100202 uaccess_disable tbl
203
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000204 adr tbl, sys_call_table @ load syscall table pointer
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000205
206#if defined(CONFIG_OABI_COMPAT)
207 /*
208 * If the swi argument is zero, this is an EABI call and we do nothing.
209 *
210 * If this is an old ABI call, get the syscall number into scno and
211 * get the old ABI syscall table address.
212 */
213 bics r10, r10, #0xff000000
214 eorne scno, r10, #__NR_OABI_SYSCALL_BASE
215 ldrne tbl, =sys_oabi_call_table
216#elif !defined(CONFIG_AEABI)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217 bic scno, scno, #0xff000000 @ mask off SWI op-code
Russell Kinge0f9f4a2005-04-26 15:19:24 +0100218 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000219#endif
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000220
Al Viro81783782012-07-19 17:48:21 +0100221local_restart:
Nicolas Pitre70c70d92010-08-26 15:08:35 -0700222 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
Nicolas Pitre3f2829a2006-01-14 16:31:29 +0000223 stmdb sp!, {r4, r5} @ push fifth and sixth args
Nicolas Pitre70c70d92010-08-26 15:08:35 -0700224
Nathaniel Husted29ef73b2012-01-03 14:23:09 -0500225 tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 bne __sys_trace
227
Vincent Whitchurch88bc59c2018-07-13 11:12:22 +0100228 invoke_syscall tbl, scno, r10, __ret_fast_syscall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229
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
Russell King49b85392018-11-07 11:43:56 -0500261 mov scno, r0
262 invoke_syscall tbl, scno, r10, __sys_trace_return, reload=1
Kees Cookad75b512012-11-15 22:12:17 +0100263 cmp scno, #-1 @ skip the syscall?
264 bne 2b
265 add sp, sp, #S_OFF @ restore stack
266 b ret_slow_syscall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267
268__sys_trace_return:
269 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
Will Deaconad722542012-07-06 15:50:14 +0100270 mov r0, sp
271 bl syscall_trace_exit
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 b ret_slow_syscall
273
Russell King3302cad2015-08-20 16:13:37 +0100274__sys_trace_return_nosave:
Russell Kinge0aa3a62015-08-20 17:39:32 +0100275 enable_irq_notrace
Russell King3302cad2015-08-20 16:13:37 +0100276 mov r0, sp
277 bl syscall_trace_exit
278 b ret_slow_syscall
279
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280 .align 5
281#ifdef CONFIG_ALIGNMENT_TRAP
282 .type __cr_alignment, #object
283__cr_alignment:
284 .word cr_alignment
285#endif
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000286 .ltorg
287
288/*
289 * This is the syscall table declaration for native ABI syscalls.
290 * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
291 */
292#define ABI(native, compat) native
293#ifdef CONFIG_AEABI
294#define OBSOLETE(syscall) sys_ni_syscall
295#else
296#define OBSOLETE(syscall) syscall
297#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700298
299 .type sys_call_table, #object
300ENTRY(sys_call_table)
301#include "calls.S"
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000302#undef ABI
303#undef OBSOLETE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
305/*============================================================================
306 * Special system call wrappers
307 */
308@ r0 = syscall number
Russell King567bd982005-12-17 15:25:42 +0000309@ r8 = syscall table
Linus Torvalds1da177e2005-04-16 15:20:36 -0700310sys_syscall:
Paul Brook52475932006-05-16 14:25:55 +0100311 bic scno, r0, #__NR_OABI_SYSCALL_BASE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
313 cmpne scno, #NR_syscalls @ check range
Russell King49b85392018-11-07 11:43:56 -0500314#ifdef CONFIG_CPU_SPECTRE
315 movhs scno, #0
316 csdb
317#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318 stmloia sp, {r5, r6} @ shuffle args
319 movlo r0, r1
320 movlo r1, r2
321 movlo r2, r3
322 movlo r3, r4
323 ldrlo pc, [tbl, scno, lsl #2]
324 b sys_ni_syscall
Catalin Marinas93ed3972008-08-28 11:22:32 +0100325ENDPROC(sys_syscall)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327sys_sigreturn_wrapper:
328 add r0, sp, #S_OFF
Al Viro653d48b2010-09-17 14:34:39 +0100329 mov why, #0 @ prevent syscall restart handling
Linus Torvalds1da177e2005-04-16 15:20:36 -0700330 b sys_sigreturn
Catalin Marinas93ed3972008-08-28 11:22:32 +0100331ENDPROC(sys_sigreturn_wrapper)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700332
333sys_rt_sigreturn_wrapper:
334 add r0, sp, #S_OFF
Al Viro653d48b2010-09-17 14:34:39 +0100335 mov why, #0 @ prevent syscall restart handling
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336 b sys_rt_sigreturn
Catalin Marinas93ed3972008-08-28 11:22:32 +0100337ENDPROC(sys_rt_sigreturn_wrapper)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338
Nicolas Pitre713c4812006-01-14 16:35:03 +0000339sys_statfs64_wrapper:
340 teq r1, #88
341 moveq r1, #84
342 b sys_statfs64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100343ENDPROC(sys_statfs64_wrapper)
Nicolas Pitre713c4812006-01-14 16:35:03 +0000344
345sys_fstatfs64_wrapper:
346 teq r1, #88
347 moveq r1, #84
348 b sys_fstatfs64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100349ENDPROC(sys_fstatfs64_wrapper)
Nicolas Pitre713c4812006-01-14 16:35:03 +0000350
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351/*
352 * Note: off_4k (r5) is always units of 4K. If we can't do the requested
353 * offset, we return EINVAL.
354 */
355sys_mmap2:
356#if PAGE_SHIFT > 12
357 tst r5, #PGOFF_MASK
358 moveq r5, r5, lsr #PAGE_SHIFT - 12
359 streq r5, [sp, #4]
Al Virof8b72562009-11-30 17:37:04 -0500360 beq sys_mmap_pgoff
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361 mov r0, #-EINVAL
Russell King6ebbf2c2014-06-30 16:29:12 +0100362 ret lr
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363#else
364 str r5, [sp, #4]
Al Virof8b72562009-11-30 17:37:04 -0500365 b sys_mmap_pgoff
Linus Torvalds1da177e2005-04-16 15:20:36 -0700366#endif
Catalin Marinas93ed3972008-08-28 11:22:32 +0100367ENDPROC(sys_mmap2)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000368
369#ifdef CONFIG_OABI_COMPAT
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000370
Nicolas Pitre687ad012006-01-14 16:35:31 +0000371/*
372 * These are syscalls with argument register differences
373 */
374
375sys_oabi_pread64:
376 stmia sp, {r3, r4}
377 b sys_pread64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100378ENDPROC(sys_oabi_pread64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000379
380sys_oabi_pwrite64:
381 stmia sp, {r3, r4}
382 b sys_pwrite64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100383ENDPROC(sys_oabi_pwrite64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000384
385sys_oabi_truncate64:
386 mov r3, r2
387 mov r2, r1
388 b sys_truncate64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100389ENDPROC(sys_oabi_truncate64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000390
391sys_oabi_ftruncate64:
392 mov r3, r2
393 mov r2, r1
394 b sys_ftruncate64
Catalin Marinas93ed3972008-08-28 11:22:32 +0100395ENDPROC(sys_oabi_ftruncate64)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000396
397sys_oabi_readahead:
398 str r3, [sp]
399 mov r3, r2
400 mov r2, r1
401 b sys_readahead
Catalin Marinas93ed3972008-08-28 11:22:32 +0100402ENDPROC(sys_oabi_readahead)
Nicolas Pitre687ad012006-01-14 16:35:31 +0000403
Nicolas Pitredd35afc2006-01-14 16:36:12 +0000404/*
405 * Let's declare a second syscall table for old ABI binaries
406 * using the compatibility syscall entries.
407 */
408#define ABI(native, compat) compat
409#define OBSOLETE(syscall) syscall
410
411 .type sys_oabi_call_table, #object
412ENTRY(sys_oabi_call_table)
413#include "calls.S"
414#undef ABI
415#undef OBSOLETE
416
Nicolas Pitre687ad012006-01-14 16:35:31 +0000417#endif
418