entry-common.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. /*
  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. */
  10. #include <asm/unistd.h>
  11. #include <asm/ftrace.h>
  12. #include <asm/unwind.h>
  13. #ifdef CONFIG_NEED_RET_TO_USER
  14. #include <mach/entry-macro.S>
  15. #else
  16. .macro arch_ret_to_user, tmp1, tmp2
  17. .endm
  18. #endif
  19. #include "entry-header.S"
  20. .align 5
  21. /*
  22. * This is the fast syscall return path. We do as little as
  23. * possible here, and this includes saving r0 back into the SVC
  24. * stack.
  25. */
  26. ret_fast_syscall:
  27. UNWIND(.fnstart )
  28. UNWIND(.cantunwind )
  29. disable_irq @ disable interrupts
  30. ldr r1, [tsk, #TI_FLAGS]
  31. tst r1, #_TIF_WORK_MASK
  32. bne fast_work_pending
  33. #if defined(CONFIG_IRQSOFF_TRACER)
  34. asm_trace_hardirqs_on
  35. #endif
  36. /* perform architecture specific actions before user return */
  37. arch_ret_to_user r1, lr
  38. restore_user_regs fast = 1, offset = S_OFF
  39. UNWIND(.fnend )
  40. /*
  41. * Ok, we need to do extra processing, enter the slow path.
  42. */
  43. fast_work_pending:
  44. str r0, [sp, #S_R0+S_OFF]! @ returned r0
  45. work_pending:
  46. tst r1, #_TIF_NEED_RESCHED
  47. bne work_resched
  48. /*
  49. * TIF_SIGPENDING or TIF_NOTIFY_RESUME must've been set if we got here
  50. */
  51. ldr r2, [sp, #S_PSR]
  52. mov r0, sp @ 'regs'
  53. tst r2, #15 @ are we returning to user mode?
  54. bne no_work_pending @ no? just leave, then...
  55. mov r2, why @ 'syscall'
  56. tst r1, #_TIF_SIGPENDING @ delivering a signal?
  57. movne why, #0 @ prevent further restarts
  58. bl do_notify_resume
  59. b ret_slow_syscall @ Check work again
  60. work_resched:
  61. bl schedule
  62. /*
  63. * "slow" syscall return path. "why" tells us if this was a real syscall.
  64. */
  65. ENTRY(ret_to_user)
  66. ret_slow_syscall:
  67. disable_irq @ disable interrupts
  68. ENTRY(ret_to_user_from_irq)
  69. ldr r1, [tsk, #TI_FLAGS]
  70. tst r1, #_TIF_WORK_MASK
  71. bne work_pending
  72. no_work_pending:
  73. #if defined(CONFIG_IRQSOFF_TRACER)
  74. asm_trace_hardirqs_on
  75. #endif
  76. /* perform architecture specific actions before user return */
  77. arch_ret_to_user r1, lr
  78. restore_user_regs fast = 0, offset = 0
  79. ENDPROC(ret_to_user_from_irq)
  80. ENDPROC(ret_to_user)
  81. /*
  82. * This is how we return from a fork.
  83. */
  84. ENTRY(ret_from_fork)
  85. bl schedule_tail
  86. get_thread_info tsk
  87. ldr r1, [tsk, #TI_FLAGS] @ check for syscall tracing
  88. mov why, #1
  89. tst r1, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
  90. beq ret_slow_syscall
  91. mov r1, sp
  92. mov r0, #1 @ trace exit [IP = 1]
  93. bl syscall_trace
  94. b ret_slow_syscall
  95. ENDPROC(ret_from_fork)
  96. .equ NR_syscalls,0
  97. #define CALL(x) .equ NR_syscalls,NR_syscalls+1
  98. #include "calls.S"
  99. #undef CALL
  100. #define CALL(x) .long x
  101. #ifdef CONFIG_FUNCTION_TRACER
  102. /*
  103. * When compiling with -pg, gcc inserts a call to the mcount routine at the
  104. * start of every function. In mcount, apart from the function's address (in
  105. * lr), we need to get hold of the function's caller's address.
  106. *
  107. * Older GCCs (pre-4.4) inserted a call to a routine called mcount like this:
  108. *
  109. * bl mcount
  110. *
  111. * These versions have the limitation that in order for the mcount routine to
  112. * be able to determine the function's caller's address, an APCS-style frame
  113. * pointer (which is set up with something like the code below) is required.
  114. *
  115. * mov ip, sp
  116. * push {fp, ip, lr, pc}
  117. * sub fp, ip, #4
  118. *
  119. * With EABI, these frame pointers are not available unless -mapcs-frame is
  120. * specified, and if building as Thumb-2, not even then.
  121. *
  122. * Newer GCCs (4.4+) solve this problem by introducing a new version of mcount,
  123. * with call sites like:
  124. *
  125. * push {lr}
  126. * bl __gnu_mcount_nc
  127. *
  128. * With these compilers, frame pointers are not necessary.
  129. *
  130. * mcount can be thought of as a function called in the middle of a subroutine
  131. * call. As such, it needs to be transparent for both the caller and the
  132. * callee: the original lr needs to be restored when leaving mcount, and no
  133. * registers should be clobbered. (In the __gnu_mcount_nc implementation, we
  134. * clobber the ip register. This is OK because the ARM calling convention
  135. * allows it to be clobbered in subroutines and doesn't use it to hold
  136. * parameters.)
  137. *
  138. * When using dynamic ftrace, we patch out the mcount call by a "mov r0, r0"
  139. * for the mcount case, and a "pop {lr}" for the __gnu_mcount_nc case (see
  140. * arch/arm/kernel/ftrace.c).
  141. */
  142. #ifndef CONFIG_OLD_MCOUNT
  143. #if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
  144. #error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.
  145. #endif
  146. #endif
  147. .macro mcount_adjust_addr rd, rn
  148. bic \rd, \rn, #1 @ clear the Thumb bit if present
  149. sub \rd, \rd, #MCOUNT_INSN_SIZE
  150. .endm
  151. .macro __mcount suffix
  152. mcount_enter
  153. ldr r0, =ftrace_trace_function
  154. ldr r2, [r0]
  155. adr r0, .Lftrace_stub
  156. cmp r0, r2
  157. bne 1f
  158. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  159. ldr r1, =ftrace_graph_return
  160. ldr r2, [r1]
  161. cmp r0, r2
  162. bne ftrace_graph_caller\suffix
  163. ldr r1, =ftrace_graph_entry
  164. ldr r2, [r1]
  165. ldr r0, =ftrace_graph_entry_stub
  166. cmp r0, r2
  167. bne ftrace_graph_caller\suffix
  168. #endif
  169. mcount_exit
  170. 1: mcount_get_lr r1 @ lr of instrumented func
  171. mcount_adjust_addr r0, lr @ instrumented function
  172. adr lr, BSYM(2f)
  173. mov pc, r2
  174. 2: mcount_exit
  175. .endm
  176. .macro __ftrace_caller suffix
  177. mcount_enter
  178. mcount_get_lr r1 @ lr of instrumented func
  179. mcount_adjust_addr r0, lr @ instrumented function
  180. .globl ftrace_call\suffix
  181. ftrace_call\suffix:
  182. bl ftrace_stub
  183. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  184. .globl ftrace_graph_call\suffix
  185. ftrace_graph_call\suffix:
  186. mov r0, r0
  187. #endif
  188. mcount_exit
  189. .endm
  190. .macro __ftrace_graph_caller
  191. sub r0, fp, #4 @ &lr of instrumented routine (&parent)
  192. #ifdef CONFIG_DYNAMIC_FTRACE
  193. @ called from __ftrace_caller, saved in mcount_enter
  194. ldr r1, [sp, #16] @ instrumented routine (func)
  195. mcount_adjust_addr r1, r1
  196. #else
  197. @ called from __mcount, untouched in lr
  198. mcount_adjust_addr r1, lr @ instrumented routine (func)
  199. #endif
  200. mov r2, fp @ frame pointer
  201. bl prepare_ftrace_return
  202. mcount_exit
  203. .endm
  204. #ifdef CONFIG_OLD_MCOUNT
  205. /*
  206. * mcount
  207. */
  208. .macro mcount_enter
  209. stmdb sp!, {r0-r3, lr}
  210. .endm
  211. .macro mcount_get_lr reg
  212. ldr \reg, [fp, #-4]
  213. .endm
  214. .macro mcount_exit
  215. ldr lr, [fp, #-4]
  216. ldmia sp!, {r0-r3, pc}
  217. .endm
  218. ENTRY(mcount)
  219. #ifdef CONFIG_DYNAMIC_FTRACE
  220. stmdb sp!, {lr}
  221. ldr lr, [fp, #-4]
  222. ldmia sp!, {pc}
  223. #else
  224. __mcount _old
  225. #endif
  226. ENDPROC(mcount)
  227. #ifdef CONFIG_DYNAMIC_FTRACE
  228. ENTRY(ftrace_caller_old)
  229. __ftrace_caller _old
  230. ENDPROC(ftrace_caller_old)
  231. #endif
  232. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  233. ENTRY(ftrace_graph_caller_old)
  234. __ftrace_graph_caller
  235. ENDPROC(ftrace_graph_caller_old)
  236. #endif
  237. .purgem mcount_enter
  238. .purgem mcount_get_lr
  239. .purgem mcount_exit
  240. #endif
  241. /*
  242. * __gnu_mcount_nc
  243. */
  244. .macro mcount_enter
  245. stmdb sp!, {r0-r3, lr}
  246. .endm
  247. .macro mcount_get_lr reg
  248. ldr \reg, [sp, #20]
  249. .endm
  250. .macro mcount_exit
  251. ldmia sp!, {r0-r3, ip, lr}
  252. mov pc, ip
  253. .endm
  254. ENTRY(__gnu_mcount_nc)
  255. #ifdef CONFIG_DYNAMIC_FTRACE
  256. mov ip, lr
  257. ldmia sp!, {lr}
  258. mov pc, ip
  259. #else
  260. __mcount
  261. #endif
  262. ENDPROC(__gnu_mcount_nc)
  263. #ifdef CONFIG_DYNAMIC_FTRACE
  264. ENTRY(ftrace_caller)
  265. __ftrace_caller
  266. ENDPROC(ftrace_caller)
  267. #endif
  268. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  269. ENTRY(ftrace_graph_caller)
  270. __ftrace_graph_caller
  271. ENDPROC(ftrace_graph_caller)
  272. #endif
  273. .purgem mcount_enter
  274. .purgem mcount_get_lr
  275. .purgem mcount_exit
  276. #ifdef CONFIG_FUNCTION_GRAPH_TRACER
  277. .globl return_to_handler
  278. return_to_handler:
  279. stmdb sp!, {r0-r3}
  280. mov r0, fp @ frame pointer
  281. bl ftrace_return_to_handler
  282. mov lr, r0 @ r0 has real ret addr
  283. ldmia sp!, {r0-r3}
  284. mov pc, lr
  285. #endif
  286. ENTRY(ftrace_stub)
  287. .Lftrace_stub:
  288. mov pc, lr
  289. ENDPROC(ftrace_stub)
  290. #endif /* CONFIG_FUNCTION_TRACER */
  291. /*=============================================================================
  292. * SWI handler
  293. *-----------------------------------------------------------------------------
  294. */
  295. /* If we're optimising for StrongARM the resulting code won't
  296. run on an ARM7 and we can save a couple of instructions.
  297. --pb */
  298. #ifdef CONFIG_CPU_ARM710
  299. #define A710(code...) code
  300. .Larm710bug:
  301. ldmia sp, {r0 - lr}^ @ Get calling r0 - lr
  302. mov r0, r0
  303. add sp, sp, #S_FRAME_SIZE
  304. subs pc, lr, #4
  305. #else
  306. #define A710(code...)
  307. #endif
  308. .align 5
  309. ENTRY(vector_swi)
  310. sub sp, sp, #S_FRAME_SIZE
  311. stmia sp, {r0 - r12} @ Calling r0 - r12
  312. ARM( add r8, sp, #S_PC )
  313. ARM( stmdb r8, {sp, lr}^ ) @ Calling sp, lr
  314. THUMB( mov r8, sp )
  315. THUMB( store_user_sp_lr r8, r10, S_SP ) @ calling sp, lr
  316. mrs r8, spsr @ called from non-FIQ mode, so ok.
  317. str lr, [sp, #S_PC] @ Save calling PC
  318. str r8, [sp, #S_PSR] @ Save CPSR
  319. str r0, [sp, #S_OLD_R0] @ Save OLD_R0
  320. zero_fp
  321. /*
  322. * Get the system call number.
  323. */
  324. #if defined(CONFIG_OABI_COMPAT)
  325. /*
  326. * If we have CONFIG_OABI_COMPAT then we need to look at the swi
  327. * value to determine if it is an EABI or an old ABI call.
  328. */
  329. #ifdef CONFIG_ARM_THUMB
  330. tst r8, #PSR_T_BIT
  331. movne r10, #0 @ no thumb OABI emulation
  332. ldreq r10, [lr, #-4] @ get SWI instruction
  333. #else
  334. ldr r10, [lr, #-4] @ get SWI instruction
  335. A710( and ip, r10, #0x0f000000 @ check for SWI )
  336. A710( teq ip, #0x0f000000 )
  337. A710( bne .Larm710bug )
  338. #endif
  339. #ifdef CONFIG_CPU_ENDIAN_BE8
  340. rev r10, r10 @ little endian instruction
  341. #endif
  342. #elif defined(CONFIG_AEABI)
  343. /*
  344. * Pure EABI user space always put syscall number into scno (r7).
  345. */
  346. A710( ldr ip, [lr, #-4] @ get SWI instruction )
  347. A710( and ip, ip, #0x0f000000 @ check for SWI )
  348. A710( teq ip, #0x0f000000 )
  349. A710( bne .Larm710bug )
  350. #elif defined(CONFIG_ARM_THUMB)
  351. /* Legacy ABI only, possibly thumb mode. */
  352. tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs
  353. addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in
  354. ldreq scno, [lr, #-4]
  355. #else
  356. /* Legacy ABI only. */
  357. ldr scno, [lr, #-4] @ get SWI instruction
  358. A710( and ip, scno, #0x0f000000 @ check for SWI )
  359. A710( teq ip, #0x0f000000 )
  360. A710( bne .Larm710bug )
  361. #endif
  362. #ifdef CONFIG_ALIGNMENT_TRAP
  363. ldr ip, __cr_alignment
  364. ldr ip, [ip]
  365. mcr p15, 0, ip, c1, c0 @ update control register
  366. #endif
  367. enable_irq
  368. get_thread_info tsk
  369. adr tbl, sys_call_table @ load syscall table pointer
  370. #if defined(CONFIG_OABI_COMPAT)
  371. /*
  372. * If the swi argument is zero, this is an EABI call and we do nothing.
  373. *
  374. * If this is an old ABI call, get the syscall number into scno and
  375. * get the old ABI syscall table address.
  376. */
  377. bics r10, r10, #0xff000000
  378. eorne scno, r10, #__NR_OABI_SYSCALL_BASE
  379. ldrne tbl, =sys_oabi_call_table
  380. #elif !defined(CONFIG_AEABI)
  381. bic scno, scno, #0xff000000 @ mask off SWI op-code
  382. eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
  383. #endif
  384. ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
  385. stmdb sp!, {r4, r5} @ push fifth and sixth args
  386. #ifdef CONFIG_SECCOMP
  387. tst r10, #_TIF_SECCOMP
  388. beq 1f
  389. mov r0, scno
  390. bl __secure_computing
  391. add r0, sp, #S_R0 + S_OFF @ pointer to regs
  392. ldmia r0, {r0 - r3} @ have to reload r0 - r3
  393. 1:
  394. #endif
  395. tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
  396. bne __sys_trace
  397. cmp scno, #NR_syscalls @ check upper syscall limit
  398. adr lr, BSYM(ret_fast_syscall) @ return address
  399. ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
  400. add r1, sp, #S_OFF
  401. 2: mov why, #0 @ no longer a real syscall
  402. cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
  403. eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
  404. bcs arm_syscall
  405. b sys_ni_syscall @ not private func
  406. ENDPROC(vector_swi)
  407. /*
  408. * This is the really slow path. We're going to be doing
  409. * context switches, and waiting for our parent to respond.
  410. */
  411. __sys_trace:
  412. mov r2, scno
  413. add r1, sp, #S_OFF
  414. mov r0, #0 @ trace entry [IP = 0]
  415. bl syscall_trace
  416. adr lr, BSYM(__sys_trace_return) @ return address
  417. mov scno, r0 @ syscall number (possibly new)
  418. add r1, sp, #S_R0 + S_OFF @ pointer to regs
  419. cmp scno, #NR_syscalls @ check upper syscall limit
  420. ldmccia r1, {r0 - r3} @ have to reload r0 - r3
  421. ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
  422. b 2b
  423. __sys_trace_return:
  424. str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
  425. mov r2, scno
  426. mov r1, sp
  427. mov r0, #1 @ trace exit [IP = 1]
  428. bl syscall_trace
  429. b ret_slow_syscall
  430. .align 5
  431. #ifdef CONFIG_ALIGNMENT_TRAP
  432. .type __cr_alignment, #object
  433. __cr_alignment:
  434. .word cr_alignment
  435. #endif
  436. .ltorg
  437. /*
  438. * This is the syscall table declaration for native ABI syscalls.
  439. * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
  440. */
  441. #define ABI(native, compat) native
  442. #ifdef CONFIG_AEABI
  443. #define OBSOLETE(syscall) sys_ni_syscall
  444. #else
  445. #define OBSOLETE(syscall) syscall
  446. #endif
  447. .type sys_call_table, #object
  448. ENTRY(sys_call_table)
  449. #include "calls.S"
  450. #undef ABI
  451. #undef OBSOLETE
  452. /*============================================================================
  453. * Special system call wrappers
  454. */
  455. @ r0 = syscall number
  456. @ r8 = syscall table
  457. sys_syscall:
  458. bic scno, r0, #__NR_OABI_SYSCALL_BASE
  459. cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
  460. cmpne scno, #NR_syscalls @ check range
  461. stmloia sp, {r5, r6} @ shuffle args
  462. movlo r0, r1
  463. movlo r1, r2
  464. movlo r2, r3
  465. movlo r3, r4
  466. ldrlo pc, [tbl, scno, lsl #2]
  467. b sys_ni_syscall
  468. ENDPROC(sys_syscall)
  469. sys_fork_wrapper:
  470. add r0, sp, #S_OFF
  471. b sys_fork
  472. ENDPROC(sys_fork_wrapper)
  473. sys_vfork_wrapper:
  474. add r0, sp, #S_OFF
  475. b sys_vfork
  476. ENDPROC(sys_vfork_wrapper)
  477. sys_execve_wrapper:
  478. add r3, sp, #S_OFF
  479. b sys_execve
  480. ENDPROC(sys_execve_wrapper)
  481. sys_clone_wrapper:
  482. add ip, sp, #S_OFF
  483. str ip, [sp, #4]
  484. b sys_clone
  485. ENDPROC(sys_clone_wrapper)
  486. sys_sigreturn_wrapper:
  487. add r0, sp, #S_OFF
  488. mov why, #0 @ prevent syscall restart handling
  489. b sys_sigreturn
  490. ENDPROC(sys_sigreturn_wrapper)
  491. sys_rt_sigreturn_wrapper:
  492. add r0, sp, #S_OFF
  493. mov why, #0 @ prevent syscall restart handling
  494. b sys_rt_sigreturn
  495. ENDPROC(sys_rt_sigreturn_wrapper)
  496. sys_sigaltstack_wrapper:
  497. ldr r2, [sp, #S_OFF + S_SP]
  498. b do_sigaltstack
  499. ENDPROC(sys_sigaltstack_wrapper)
  500. sys_statfs64_wrapper:
  501. teq r1, #88
  502. moveq r1, #84
  503. b sys_statfs64
  504. ENDPROC(sys_statfs64_wrapper)
  505. sys_fstatfs64_wrapper:
  506. teq r1, #88
  507. moveq r1, #84
  508. b sys_fstatfs64
  509. ENDPROC(sys_fstatfs64_wrapper)
  510. /*
  511. * Note: off_4k (r5) is always units of 4K. If we can't do the requested
  512. * offset, we return EINVAL.
  513. */
  514. sys_mmap2:
  515. #if PAGE_SHIFT > 12
  516. tst r5, #PGOFF_MASK
  517. moveq r5, r5, lsr #PAGE_SHIFT - 12
  518. streq r5, [sp, #4]
  519. beq sys_mmap_pgoff
  520. mov r0, #-EINVAL
  521. mov pc, lr
  522. #else
  523. str r5, [sp, #4]
  524. b sys_mmap_pgoff
  525. #endif
  526. ENDPROC(sys_mmap2)
  527. #ifdef CONFIG_OABI_COMPAT
  528. /*
  529. * These are syscalls with argument register differences
  530. */
  531. sys_oabi_pread64:
  532. stmia sp, {r3, r4}
  533. b sys_pread64
  534. ENDPROC(sys_oabi_pread64)
  535. sys_oabi_pwrite64:
  536. stmia sp, {r3, r4}
  537. b sys_pwrite64
  538. ENDPROC(sys_oabi_pwrite64)
  539. sys_oabi_truncate64:
  540. mov r3, r2
  541. mov r2, r1
  542. b sys_truncate64
  543. ENDPROC(sys_oabi_truncate64)
  544. sys_oabi_ftruncate64:
  545. mov r3, r2
  546. mov r2, r1
  547. b sys_ftruncate64
  548. ENDPROC(sys_oabi_ftruncate64)
  549. sys_oabi_readahead:
  550. str r3, [sp]
  551. mov r3, r2
  552. mov r2, r1
  553. b sys_readahead
  554. ENDPROC(sys_oabi_readahead)
  555. /*
  556. * Let's declare a second syscall table for old ABI binaries
  557. * using the compatibility syscall entries.
  558. */
  559. #define ABI(native, compat) compat
  560. #define OBSOLETE(syscall) syscall
  561. .type sys_oabi_call_table, #object
  562. ENTRY(sys_oabi_call_table)
  563. #include "calls.S"
  564. #undef ABI
  565. #undef OBSOLETE
  566. #endif