entry.S 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. /*
  2. * Copyright (C) 2000-2003 Axis Communications AB
  3. *
  4. * Authors: Bjorn Wesen (bjornw@axis.com)
  5. * Tobias Anderberg (tobiasa@axis.com), CRISv32 port.
  6. *
  7. * Code for the system-call and fault low-level handling routines.
  8. *
  9. * NOTE: This code handles signal-recognition, which happens every time
  10. * after a timer-interrupt and after each system call.
  11. *
  12. * Stack layout in 'ret_from_system_call':
  13. * ptrace needs to have all regs on the stack.
  14. * if the order here is changed, it needs to be
  15. * updated in fork.c:copy_process, signal.c:do_signal,
  16. * ptrace.c and ptrace.h
  17. *
  18. */
  19. #include <linux/config.h>
  20. #include <linux/linkage.h>
  21. #include <linux/sys.h>
  22. #include <asm/unistd.h>
  23. #include <asm/errno.h>
  24. #include <asm/thread_info.h>
  25. #include <asm/arch/offset.h>
  26. #include <asm/arch/hwregs/asm/reg_map_asm.h>
  27. #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h>
  28. ;; Exported functions.
  29. .globl system_call
  30. .globl ret_from_intr
  31. .globl ret_from_fork
  32. .globl resume
  33. .globl multiple_interrupt
  34. .globl nmi_interrupt
  35. .globl spurious_interrupt
  36. .globl do_sigtrap
  37. .globl gdb_handle_exception
  38. .globl sys_call_table
  39. ; Check if preemptive kernel scheduling should be done.
  40. #ifdef CONFIG_PREEMPT
  41. _resume_kernel:
  42. di
  43. ; Load current task struct.
  44. movs.w -8192, $r0 ; THREAD_SIZE = 8192
  45. and.d $sp, $r0
  46. addoq +TI_preempt_count, $r0, $acr
  47. move.d [$acr], $r10 ; Preemption disabled?
  48. bne _Rexit
  49. nop
  50. _need_resched:
  51. addoq +TI_flags, $r0, $acr
  52. move.d [$acr], $r10
  53. btstq TIF_NEED_RESCHED, $r10 ; Check if need_resched is set.
  54. bpl _Rexit
  55. nop
  56. ; Do preemptive kernel scheduling.
  57. jsr preempt_schedule_irq
  58. nop
  59. ; Load new task struct.
  60. movs.w -8192, $r0 ; THREAD_SIZE = 8192.
  61. and.d $sp, $r0
  62. ; One more time with new task.
  63. ba _need_resched
  64. nop
  65. #else
  66. #define _resume_kernel _Rexit
  67. #endif
  68. ; Called at exit from fork. schedule_tail must be called to drop
  69. ; spinlock if CONFIG_PREEMPT.
  70. ret_from_fork:
  71. jsr schedule_tail
  72. nop
  73. ba ret_from_sys_call
  74. nop
  75. ret_from_intr:
  76. ;; Check for resched if preemptive kernel, or if we're going back to
  77. ;; user-mode. This test matches the user_regs(regs) macro. Don't simply
  78. ;; test CCS since that doesn't necessarily reflect what mode we'll
  79. ;; return into.
  80. addoq +PT_ccs, $sp, $acr
  81. move.d [$acr], $r0
  82. btstq 16, $r0 ; User-mode flag.
  83. bpl _resume_kernel
  84. ; Note that di below is in delay slot.
  85. _resume_userspace:
  86. di ; So need_resched and sigpending don't change.
  87. movs.w -8192, $r0 ; THREAD_SIZE == 8192
  88. and.d $sp, $r0
  89. addoq +TI_flags, $r0, $acr ; current->work
  90. move.d [$acr], $r10
  91. and.d _TIF_WORK_MASK, $r10 ; Work to be done on return?
  92. bne _work_pending
  93. nop
  94. ba _Rexit
  95. nop
  96. ;; The system_call is called by a BREAK instruction, which looks pretty
  97. ;; much like any other exception.
  98. ;;
  99. ;; System calls can't be made from interrupts but we still stack ERP
  100. ;; to have a complete stack frame.
  101. ;;
  102. ;; In r9 we have the wanted syscall number. Arguments come in r10,r11,r12,
  103. ;; r13,mof,srp
  104. ;;
  105. ;; This function looks on the _surface_ like spaghetti programming, but it's
  106. ;; really designed so that the fast-path does not force cache-loading of
  107. ;; non-used instructions. Only the non-common cases cause the outlined code
  108. ;; to run..
  109. system_call:
  110. ;; Stack-frame similar to the irq heads, which is reversed in
  111. ;; ret_from_sys_call.
  112. subq 12, $sp ; Skip EXS, EDA.
  113. move $erp, [$sp]
  114. subq 4, $sp
  115. move $srp, [$sp]
  116. subq 4, $sp
  117. move $ccs, [$sp]
  118. subq 4, $sp
  119. ei ; Allow IRQs while handling system call
  120. move $spc, [$sp]
  121. subq 4, $sp
  122. move $mof, [$sp]
  123. subq 4, $sp
  124. move $srs, [$sp]
  125. subq 4, $sp
  126. move.d $acr, [$sp]
  127. subq 14*4, $sp ; Make room for R0-R13.
  128. movem $r13, [$sp] ; Push R0-R13
  129. subq 4, $sp
  130. move.d $r10, [$sp] ; Push orig_r10.
  131. ; Set S-bit when kernel debugging to keep hardware breakpoints active.
  132. #ifdef CONFIG_ETRAX_KGDB
  133. move $ccs, $r0
  134. or.d (1<<9), $r0
  135. move $r0, $ccs
  136. #endif
  137. movs.w -ENOSYS, $r0
  138. addoq +PT_r10, $sp, $acr
  139. move.d $r0, [$acr]
  140. ;; Check if this process is syscall-traced.
  141. movs.w -8192, $r0 ; THREAD_SIZE == 8192
  142. and.d $sp, $r0
  143. addoq +TI_flags, $r0, $acr
  144. move.d [$acr], $r0
  145. btstq TIF_SYSCALL_TRACE, $r0
  146. bmi _syscall_trace_entry
  147. nop
  148. _syscall_traced:
  149. ;; Check for sanity in the requested syscall number.
  150. cmpu.w NR_syscalls, $r9
  151. bhs ret_from_sys_call
  152. lslq 2, $r9 ; Multiply by 4, in the delay slot.
  153. ;; The location on the stack for the register structure is passed as a
  154. ;; seventh argument. Some system calls need this.
  155. move.d $sp, $r0
  156. subq 4, $sp
  157. move.d $r0, [$sp]
  158. ;; The registers carrying parameters (R10-R13) are intact. The optional
  159. ;; fifth and sixth parameters is in MOF and SRP respectivly. Put them
  160. ;; back on the stack.
  161. subq 4, $sp
  162. move $srp, [$sp]
  163. subq 4, $sp
  164. move $mof, [$sp]
  165. ;; Actually to the system call.
  166. addo.d +sys_call_table, $r9, $acr
  167. move.d [$acr], $acr
  168. jsr $acr
  169. nop
  170. addq 3*4, $sp ; Pop the mof, srp and regs parameters.
  171. addoq +PT_r10, $sp, $acr
  172. move.d $r10, [$acr] ; Save the return value.
  173. moveq 1, $r9 ; "Parameter" to ret_from_sys_call to
  174. ; show it was a sys call.
  175. ;; Fall through into ret_from_sys_call to return.
  176. ret_from_sys_call:
  177. ;; R9 is a parameter:
  178. ;; >= 1 from syscall
  179. ;; 0 from irq
  180. ;; Get the current task-struct pointer.
  181. movs.w -8192, $r0 ; THREAD_SIZE == 8192
  182. and.d $sp, $r0
  183. di ; Make sure need_resched and sigpending don't change.
  184. addoq +TI_flags, $r0, $acr
  185. move.d [$acr], $r1
  186. and.d _TIF_ALLWORK_MASK, $r1
  187. bne _syscall_exit_work
  188. nop
  189. _Rexit:
  190. ;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
  191. ;; and ptregs.h.
  192. addq 4, $sp ; Skip orig_r10.
  193. movem [$sp+], $r13 ; Registers R0-R13.
  194. move.d [$sp+], $acr
  195. move [$sp], $srs
  196. addq 4, $sp
  197. move [$sp+], $mof
  198. move [$sp+], $spc
  199. move [$sp+], $ccs
  200. move [$sp+], $srp
  201. move [$sp+], $erp
  202. addq 8, $sp ; Skip EXS, EDA.
  203. jump $erp
  204. rfe ; Restore condition code stack in delay-slot.
  205. ;; We get here after doing a syscall if extra work might need to be done
  206. ;; perform syscall exit tracing if needed.
  207. _syscall_exit_work:
  208. ;; R0 contains current at this point and irq's are disabled.
  209. addoq +TI_flags, $r0, $acr
  210. move.d [$acr], $r1
  211. btstq TIF_SYSCALL_TRACE, $r1
  212. bpl _work_pending
  213. nop
  214. ei
  215. move.d $r9, $r1 ; Preserve R9.
  216. jsr do_syscall_trace
  217. nop
  218. move.d $r1, $r9
  219. ba _resume_userspace
  220. nop
  221. _work_pending:
  222. addoq +TI_flags, $r0, $acr
  223. move.d [$acr], $r10
  224. btstq TIF_NEED_RESCHED, $r10 ; Need resched?
  225. bpl _work_notifysig ; No, must be signal/notify.
  226. nop
  227. _work_resched:
  228. move.d $r9, $r1 ; Preserve R9.
  229. jsr schedule
  230. nop
  231. move.d $r1, $r9
  232. di
  233. addoq +TI_flags, $r0, $acr
  234. move.d [$acr], $r1
  235. and.d _TIF_WORK_MASK, $r1 ; Ignore sycall trace counter.
  236. beq _Rexit
  237. nop
  238. btstq TIF_NEED_RESCHED, $r1
  239. bmi _work_resched ; current->work.need_resched.
  240. nop
  241. _work_notifysig:
  242. ;; Deal with pending signals and notify-resume requests.
  243. addoq +TI_flags, $r0, $acr
  244. move.d [$acr], $r13 ; The thread_info_flags parameter.
  245. move.d $r9, $r10 ; do_notify_resume syscall/irq param.
  246. moveq 0, $r11 ; oldset param - 0 in this case.
  247. move.d $sp, $r12 ; The regs param.
  248. jsr do_notify_resume
  249. nop
  250. ba _Rexit
  251. nop
  252. ;; We get here as a sidetrack when we've entered a syscall with the
  253. ;; trace-bit set. We need to call do_syscall_trace and then continue
  254. ;; with the call.
  255. _syscall_trace_entry:
  256. ;; PT_r10 in the frame contains -ENOSYS as required, at this point.
  257. jsr do_syscall_trace
  258. nop
  259. ;; Now re-enter the syscall code to do the syscall itself. We need to
  260. ;; restore R9 here to contain the wanted syscall, and the other
  261. ;; parameter-bearing registers.
  262. addoq +PT_r9, $sp, $acr
  263. move.d [$acr], $r9
  264. addoq +PT_orig_r10, $sp, $acr
  265. move.d [$acr], $r10 ; PT_r10 is already -ENOSYS.
  266. addoq +PT_r11, $sp, $acr
  267. move.d [$acr], $r11
  268. addoq +PT_r12, $sp, $acr
  269. move.d [$acr], $r12
  270. addoq +PT_r13, $sp, $acr
  271. move.d [$acr], $r13
  272. addoq +PT_mof, $sp, $acr
  273. move [$acr], $mof
  274. addoq +PT_srp, $sp, $acr
  275. move [$acr], $srp
  276. ba _syscall_traced
  277. nop
  278. ;; Resume performs the actual task-switching, by switching stack
  279. ;; pointers. Input arguments are:
  280. ;;
  281. ;; R10 = prev
  282. ;; R11 = next
  283. ;; R12 = thread offset in task struct.
  284. ;;
  285. ;; Returns old current in R10.
  286. resume:
  287. subq 4, $sp
  288. move $srp, [$sp] ; Keep old/new PC on the stack.
  289. add.d $r12, $r10 ; R10 = current tasks tss.
  290. addoq +THREAD_ccs, $r10, $acr
  291. move $ccs, [$acr] ; Save IRQ enable state.
  292. di
  293. addoq +THREAD_usp, $r10, $acr
  294. move $usp, [$acr] ; Save user-mode stackpointer.
  295. ;; See copy_thread for the reason why register R9 is saved.
  296. subq 10*4, $sp
  297. movem $r9, [$sp] ; Save non-scratch registers and R9.
  298. addoq +THREAD_ksp, $r10, $acr
  299. move.d $sp, [$acr] ; Save kernel SP for old task.
  300. move.d $sp, $r10 ; Return last running task in R10.
  301. and.d -8192, $r10 ; Get thread_info from stackpointer.
  302. addoq +TI_task, $r10, $acr
  303. move.d [$acr], $r10 ; Get task.
  304. add.d $r12, $r11 ; Find the new tasks tss.
  305. addoq +THREAD_ksp, $r11, $acr
  306. move.d [$acr], $sp ; Switch to new stackframe.
  307. movem [$sp+], $r9 ; Restore non-scratch registers and R9.
  308. addoq +THREAD_usp, $r11, $acr
  309. move [$acr], $usp ; Restore user-mode stackpointer.
  310. addoq +THREAD_ccs, $r11, $acr
  311. move [$acr], $ccs ; Restore IRQ enable status.
  312. move.d [$sp+], $acr
  313. jump $acr ; Restore PC.
  314. nop
  315. nmi_interrupt:
  316. ;; If we receive a watchdog interrupt while it is not expected, then set
  317. ;; up a canonical frame and dump register contents before dying.
  318. ;; This prologue MUST match the one in irq.h and the struct in ptregs.h!
  319. subq 12, $sp ; Skip EXS, EDA.
  320. move $nrp, [$sp]
  321. subq 4, $sp
  322. move $srp, [$sp]
  323. subq 4, $sp
  324. move $ccs, [$sp]
  325. subq 4, $sp
  326. move $spc, [$sp]
  327. subq 4, $sp
  328. move $mof, [$sp]
  329. subq 4, $sp
  330. move $srs, [$sp]
  331. subq 4, $sp
  332. move.d $acr, [$sp]
  333. subq 14*4, $sp ; Make room for R0-R13.
  334. movem $r13, [$sp] ; Push R0-R13.
  335. subq 4, $sp
  336. move.d $r10, [$sp] ; Push orig_r10.
  337. move.d REG_ADDR(intr_vect, regi_irq, r_nmi), $r0
  338. move.d [$r0], $r0
  339. btstq REG_BIT(intr_vect, r_nmi, watchdog), $r0
  340. bpl 1f
  341. nop
  342. jsr handle_watchdog_bite ; In time.c.
  343. move.d $sp, $r10 ; Pointer to registers
  344. 1: btstq REG_BIT(intr_vect, r_nmi, ext), $r0
  345. bpl 1f
  346. nop
  347. jsr handle_nmi
  348. move.d $sp, $r10 ; Pointer to registers
  349. 1: addq 4, $sp ; Skip orig_r10
  350. movem [$sp+], $r13
  351. move.d [$sp+], $acr
  352. move [$sp], $srs
  353. addq 4, $sp
  354. move [$sp+], $mof
  355. move [$sp+], $spc
  356. move [$sp+], $ccs
  357. move [$sp+], $srp
  358. move [$sp+], $nrp
  359. addq 8, $sp ; Skip EXS, EDA.
  360. jump $nrp
  361. rfn
  362. .comm cause_of_death, 4 ;; Don't declare this anywhere.
  363. spurious_interrupt:
  364. di
  365. jump hard_reset_now
  366. nop
  367. ;; This handles the case when multiple interrupts arrive at the same
  368. ;; time. Jump to the first set interrupt bit in a priotiry fashion. The
  369. ;; hardware will call the unserved interrupts after the handler
  370. ;; finishes.
  371. multiple_interrupt:
  372. ;; This prologue MUST match the one in irq.h and the struct in ptregs.h!
  373. subq 12, $sp ; Skip EXS, EDA.
  374. move $erp, [$sp]
  375. subq 4, $sp
  376. move $srp, [$sp]
  377. subq 4, $sp
  378. move $ccs, [$sp]
  379. subq 4, $sp
  380. move $spc, [$sp]
  381. subq 4, $sp
  382. move $mof, [$sp]
  383. subq 4, $sp
  384. move $srs, [$sp]
  385. subq 4, $sp
  386. move.d $acr, [$sp]
  387. subq 14*4, $sp ; Make room for R0-R13.
  388. movem $r13, [$sp] ; Push R0-R13.
  389. subq 4, $sp
  390. move.d $r10, [$sp] ; Push orig_r10.
  391. ; Set S-bit when kernel debugging to keep hardware breakpoints active.
  392. #ifdef CONFIG_ETRAX_KGDB
  393. move $ccs, $r0
  394. or.d (1<<9), $r0
  395. move $r0, $ccs
  396. #endif
  397. jsr crisv32_do_multiple
  398. move.d $sp, $r10
  399. jump ret_from_intr
  400. nop
  401. do_sigtrap:
  402. ;; Sigtraps the process that executed the BREAK instruction. Creates a
  403. ;; frame that Rexit expects.
  404. subq 4, $sp
  405. move $eda, [$sp]
  406. subq 4, $sp
  407. move $exs, [$sp]
  408. subq 4, $sp
  409. move $erp, [$sp]
  410. subq 4, $sp
  411. move $srp, [$sp]
  412. subq 4, $sp
  413. move $ccs, [$sp]
  414. subq 4, $sp
  415. move $spc, [$sp]
  416. subq 4, $sp
  417. move $mof, [$sp]
  418. subq 4, $sp
  419. move $srs, [$sp]
  420. subq 4, $sp
  421. move.d $acr, [$sp]
  422. di ; Need to disable irq's at this point.
  423. subq 14*4, $sp ; Make room for r0-r13.
  424. movem $r13, [$sp] ; Push the r0-r13 registers.
  425. subq 4, $sp
  426. move.d $r10, [$sp] ; Push orig_r10.
  427. movs.w -8192, $r9 ; THREAD_SIZE == 8192
  428. and.d $sp, $r9
  429. ;; thread_info as first parameter
  430. move.d $r9, $r10
  431. moveq 5, $r11 ; SIGTRAP as second argument.
  432. jsr ugdb_trap_user
  433. nop
  434. jump ret_from_intr ; Use the return routine for interrupts.
  435. nop
  436. gdb_handle_exception:
  437. subq 4, $sp
  438. move.d $r0, [$sp]
  439. #ifdef CONFIG_ETRAX_KGDB
  440. move $ccs, $r0 ; U-flag not affected by previous insns.
  441. btstq 16, $r0 ; Test the U-flag.
  442. bmi _ugdb_handle_exception ; Go to user mode debugging.
  443. nop ; Empty delay-slot (cannot pop R0 here).
  444. ba kgdb_handle_exception ; Go to kernel debugging.
  445. move.d [$sp+], $r0 ; Restore R0 in delay slot.
  446. #endif
  447. _ugdb_handle_exception:
  448. ba do_sigtrap ; SIGTRAP the offending process.
  449. move.d [$sp+], $r0 ; Restore R0 in delay slot.
  450. .data
  451. .section .rodata,"a"
  452. sys_call_table:
  453. .long sys_restart_syscall ; 0 - old "setup()" system call, used
  454. ; for restarting.
  455. .long sys_exit
  456. .long sys_fork
  457. .long sys_read
  458. .long sys_write
  459. .long sys_open /* 5 */
  460. .long sys_close
  461. .long sys_waitpid
  462. .long sys_creat
  463. .long sys_link
  464. .long sys_unlink /* 10 */
  465. .long sys_execve
  466. .long sys_chdir
  467. .long sys_time
  468. .long sys_mknod
  469. .long sys_chmod /* 15 */
  470. .long sys_lchown16
  471. .long sys_ni_syscall /* old break syscall holder */
  472. .long sys_stat
  473. .long sys_lseek
  474. .long sys_getpid /* 20 */
  475. .long sys_mount
  476. .long sys_oldumount
  477. .long sys_setuid16
  478. .long sys_getuid16
  479. .long sys_stime /* 25 */
  480. .long sys_ptrace
  481. .long sys_alarm
  482. .long sys_fstat
  483. .long sys_pause
  484. .long sys_utime /* 30 */
  485. .long sys_ni_syscall /* old stty syscall holder */
  486. .long sys_ni_syscall /* old gtty syscall holder */
  487. .long sys_access
  488. .long sys_nice
  489. .long sys_ni_syscall /* 35 old ftime syscall holder */
  490. .long sys_sync
  491. .long sys_kill
  492. .long sys_rename
  493. .long sys_mkdir
  494. .long sys_rmdir /* 40 */
  495. .long sys_dup
  496. .long sys_pipe
  497. .long sys_times
  498. .long sys_ni_syscall /* old prof syscall holder */
  499. .long sys_brk /* 45 */
  500. .long sys_setgid16
  501. .long sys_getgid16
  502. .long sys_signal
  503. .long sys_geteuid16
  504. .long sys_getegid16 /* 50 */
  505. .long sys_acct
  506. .long sys_umount /* recycled never used phys( */
  507. .long sys_ni_syscall /* old lock syscall holder */
  508. .long sys_ioctl
  509. .long sys_fcntl /* 55 */
  510. .long sys_ni_syscall /* old mpx syscall holder */
  511. .long sys_setpgid
  512. .long sys_ni_syscall /* old ulimit syscall holder */
  513. .long sys_ni_syscall /* old sys_olduname holder */
  514. .long sys_umask /* 60 */
  515. .long sys_chroot
  516. .long sys_ustat
  517. .long sys_dup2
  518. .long sys_getppid
  519. .long sys_getpgrp /* 65 */
  520. .long sys_setsid
  521. .long sys_sigaction
  522. .long sys_sgetmask
  523. .long sys_ssetmask
  524. .long sys_setreuid16 /* 70 */
  525. .long sys_setregid16
  526. .long sys_sigsuspend
  527. .long sys_sigpending
  528. .long sys_sethostname
  529. .long sys_setrlimit /* 75 */
  530. .long sys_old_getrlimit
  531. .long sys_getrusage
  532. .long sys_gettimeofday
  533. .long sys_settimeofday
  534. .long sys_getgroups16 /* 80 */
  535. .long sys_setgroups16
  536. .long sys_select /* was old_select in Linux/E100 */
  537. .long sys_symlink
  538. .long sys_lstat
  539. .long sys_readlink /* 85 */
  540. .long sys_uselib
  541. .long sys_swapon
  542. .long sys_reboot
  543. .long old_readdir
  544. .long old_mmap /* 90 */
  545. .long sys_munmap
  546. .long sys_truncate
  547. .long sys_ftruncate
  548. .long sys_fchmod
  549. .long sys_fchown16 /* 95 */
  550. .long sys_getpriority
  551. .long sys_setpriority
  552. .long sys_ni_syscall /* old profil syscall holder */
  553. .long sys_statfs
  554. .long sys_fstatfs /* 100 */
  555. .long sys_ni_syscall /* sys_ioperm in i386 */
  556. .long sys_socketcall
  557. .long sys_syslog
  558. .long sys_setitimer
  559. .long sys_getitimer /* 105 */
  560. .long sys_newstat
  561. .long sys_newlstat
  562. .long sys_newfstat
  563. .long sys_ni_syscall /* old sys_uname holder */
  564. .long sys_ni_syscall /* sys_iopl in i386 */
  565. .long sys_vhangup
  566. .long sys_ni_syscall /* old "idle" system call */
  567. .long sys_ni_syscall /* vm86old in i386 */
  568. .long sys_wait4
  569. .long sys_swapoff /* 115 */
  570. .long sys_sysinfo
  571. .long sys_ipc
  572. .long sys_fsync
  573. .long sys_sigreturn
  574. .long sys_clone /* 120 */
  575. .long sys_setdomainname
  576. .long sys_newuname
  577. .long sys_ni_syscall /* sys_modify_ldt */
  578. .long sys_adjtimex
  579. .long sys_mprotect /* 125 */
  580. .long sys_sigprocmask
  581. .long sys_ni_syscall /* old "create_module" */
  582. .long sys_init_module
  583. .long sys_delete_module
  584. .long sys_ni_syscall /* 130: old "get_kernel_syms" */
  585. .long sys_quotactl
  586. .long sys_getpgid
  587. .long sys_fchdir
  588. .long sys_bdflush
  589. .long sys_sysfs /* 135 */
  590. .long sys_personality
  591. .long sys_ni_syscall /* for afs_syscall */
  592. .long sys_setfsuid16
  593. .long sys_setfsgid16
  594. .long sys_llseek /* 140 */
  595. .long sys_getdents
  596. .long sys_select
  597. .long sys_flock
  598. .long sys_msync
  599. .long sys_readv /* 145 */
  600. .long sys_writev
  601. .long sys_getsid
  602. .long sys_fdatasync
  603. .long sys_sysctl
  604. .long sys_mlock /* 150 */
  605. .long sys_munlock
  606. .long sys_mlockall
  607. .long sys_munlockall
  608. .long sys_sched_setparam
  609. .long sys_sched_getparam /* 155 */
  610. .long sys_sched_setscheduler
  611. .long sys_sched_getscheduler
  612. .long sys_sched_yield
  613. .long sys_sched_get_priority_max
  614. .long sys_sched_get_priority_min /* 160 */
  615. .long sys_sched_rr_get_interval
  616. .long sys_nanosleep
  617. .long sys_mremap
  618. .long sys_setresuid16
  619. .long sys_getresuid16 /* 165 */
  620. .long sys_ni_syscall /* sys_vm86 */
  621. .long sys_ni_syscall /* Old sys_query_module */
  622. .long sys_poll
  623. .long sys_nfsservctl
  624. .long sys_setresgid16 /* 170 */
  625. .long sys_getresgid16
  626. .long sys_prctl
  627. .long sys_rt_sigreturn
  628. .long sys_rt_sigaction
  629. .long sys_rt_sigprocmask /* 175 */
  630. .long sys_rt_sigpending
  631. .long sys_rt_sigtimedwait
  632. .long sys_rt_sigqueueinfo
  633. .long sys_rt_sigsuspend
  634. .long sys_pread64 /* 180 */
  635. .long sys_pwrite64
  636. .long sys_chown16
  637. .long sys_getcwd
  638. .long sys_capget
  639. .long sys_capset /* 185 */
  640. .long sys_sigaltstack
  641. .long sys_sendfile
  642. .long sys_ni_syscall /* streams1 */
  643. .long sys_ni_syscall /* streams2 */
  644. .long sys_vfork /* 190 */
  645. .long sys_getrlimit
  646. .long sys_mmap2
  647. .long sys_truncate64
  648. .long sys_ftruncate64
  649. .long sys_stat64 /* 195 */
  650. .long sys_lstat64
  651. .long sys_fstat64
  652. .long sys_lchown
  653. .long sys_getuid
  654. .long sys_getgid /* 200 */
  655. .long sys_geteuid
  656. .long sys_getegid
  657. .long sys_setreuid
  658. .long sys_setregid
  659. .long sys_getgroups /* 205 */
  660. .long sys_setgroups
  661. .long sys_fchown
  662. .long sys_setresuid
  663. .long sys_getresuid
  664. .long sys_setresgid /* 210 */
  665. .long sys_getresgid
  666. .long sys_chown
  667. .long sys_setuid
  668. .long sys_setgid
  669. .long sys_setfsuid /* 215 */
  670. .long sys_setfsgid
  671. .long sys_pivot_root
  672. .long sys_mincore
  673. .long sys_madvise
  674. .long sys_getdents64 /* 220 */
  675. .long sys_fcntl64
  676. .long sys_ni_syscall /* reserved for TUX */
  677. .long sys_ni_syscall
  678. .long sys_gettid
  679. .long sys_readahead /* 225 */
  680. .long sys_setxattr
  681. .long sys_lsetxattr
  682. .long sys_fsetxattr
  683. .long sys_getxattr
  684. .long sys_lgetxattr /* 230 */
  685. .long sys_fgetxattr
  686. .long sys_listxattr
  687. .long sys_llistxattr
  688. .long sys_flistxattr
  689. .long sys_removexattr /* 235 */
  690. .long sys_lremovexattr
  691. .long sys_fremovexattr
  692. .long sys_tkill
  693. .long sys_sendfile64
  694. .long sys_futex /* 240 */
  695. .long sys_sched_setaffinity
  696. .long sys_sched_getaffinity
  697. .long sys_ni_syscall /* sys_set_thread_area */
  698. .long sys_ni_syscall /* sys_get_thread_area */
  699. .long sys_io_setup /* 245 */
  700. .long sys_io_destroy
  701. .long sys_io_getevents
  702. .long sys_io_submit
  703. .long sys_io_cancel
  704. .long sys_fadvise64 /* 250 */
  705. .long sys_ni_syscall
  706. .long sys_exit_group
  707. .long sys_lookup_dcookie
  708. .long sys_epoll_create
  709. .long sys_epoll_ctl /* 255 */
  710. .long sys_epoll_wait
  711. .long sys_remap_file_pages
  712. .long sys_set_tid_address
  713. .long sys_timer_create
  714. .long sys_timer_settime /* 260 */
  715. .long sys_timer_gettime
  716. .long sys_timer_getoverrun
  717. .long sys_timer_delete
  718. .long sys_clock_settime
  719. .long sys_clock_gettime /* 265 */
  720. .long sys_clock_getres
  721. .long sys_clock_nanosleep
  722. .long sys_statfs64
  723. .long sys_fstatfs64
  724. .long sys_tgkill /* 270 */
  725. .long sys_utimes
  726. .long sys_fadvise64_64
  727. .long sys_ni_syscall /* sys_vserver */
  728. .long sys_ni_syscall /* sys_mbind */
  729. .long sys_ni_syscall /* 275 sys_get_mempolicy */
  730. .long sys_ni_syscall /* sys_set_mempolicy */
  731. .long sys_mq_open
  732. .long sys_mq_unlink
  733. .long sys_mq_timedsend
  734. .long sys_mq_timedreceive /* 280 */
  735. .long sys_mq_notify
  736. .long sys_mq_getsetattr
  737. .long sys_ni_syscall /* reserved for kexec */
  738. .long sys_waitid
  739. /*
  740. * NOTE!! This doesn't have to be exact - we just have
  741. * to make sure we have _enough_ of the "sys_ni_syscall"
  742. * entries. Don't panic if you notice that this hasn't
  743. * been shrunk every time we add a new system call.
  744. */
  745. .rept NR_syscalls - (.-sys_call_table) / 4
  746. .long sys_ni_syscall
  747. .endr