entry.S 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. ###############################################################################
  2. #
  3. # MN10300 Exception and interrupt entry points
  4. #
  5. # Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
  6. # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  7. # Modified by David Howells (dhowells@redhat.com)
  8. #
  9. # This program is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU General Public Licence
  11. # as published by the Free Software Foundation; either version
  12. # 2 of the Licence, or (at your option) any later version.
  13. #
  14. ###############################################################################
  15. #include <linux/sys.h>
  16. #include <linux/linkage.h>
  17. #include <asm/smp.h>
  18. #include <asm/irqflags.h>
  19. #include <asm/thread_info.h>
  20. #include <asm/intctl-regs.h>
  21. #include <asm/busctl-regs.h>
  22. #include <asm/timer-regs.h>
  23. #include <unit/leds.h>
  24. #include <asm/page.h>
  25. #include <asm/pgtable.h>
  26. #include <asm/errno.h>
  27. #include <asm/asm-offsets.h>
  28. #include <asm/frame.inc>
  29. #if defined(CONFIG_SMP) && defined(CONFIG_GDBSTUB)
  30. #include <asm/gdb-stub.h>
  31. #endif /* CONFIG_SMP && CONFIG_GDBSTUB */
  32. #ifdef CONFIG_PREEMPT
  33. #define preempt_stop LOCAL_IRQ_DISABLE
  34. #else
  35. #define preempt_stop
  36. #define resume_kernel restore_all
  37. #endif
  38. .am33_2
  39. ###############################################################################
  40. #
  41. # the return path for a forked child
  42. # - on entry, D0 holds the address of the previous task to run
  43. #
  44. ###############################################################################
  45. ENTRY(ret_from_fork)
  46. call schedule_tail[],0
  47. GET_THREAD_INFO a2
  48. # return 0 to indicate child process
  49. clr d0
  50. mov d0,(REG_D0,fp)
  51. jmp syscall_exit
  52. ENTRY(ret_from_kernel_thread)
  53. call schedule_tail[],0
  54. mov (REG_D0,fp),d0
  55. mov (REG_A0,fp),a0
  56. calls (a0)
  57. clr d0
  58. mov d0,(REG_D0,fp)
  59. jmp syscall_exit
  60. ###############################################################################
  61. #
  62. # system call handler
  63. #
  64. ###############################################################################
  65. ENTRY(system_call)
  66. add -4,sp
  67. SAVE_ALL
  68. mov d0,(REG_ORIG_D0,fp)
  69. GET_THREAD_INFO a2
  70. cmp nr_syscalls,d0
  71. bcc syscall_badsys
  72. btst _TIF_SYSCALL_TRACE,(TI_flags,a2)
  73. bne syscall_entry_trace
  74. syscall_call:
  75. add d0,d0,a1
  76. add a1,a1
  77. mov (REG_A0,fp),d0
  78. mov (sys_call_table,a1),a0
  79. calls (a0)
  80. mov d0,(REG_D0,fp)
  81. syscall_exit:
  82. # make sure we don't miss an interrupt setting need_resched or
  83. # sigpending between sampling and the rti
  84. LOCAL_IRQ_DISABLE
  85. mov (TI_flags,a2),d2
  86. btst _TIF_ALLWORK_MASK,d2
  87. bne syscall_exit_work
  88. restore_all:
  89. RESTORE_ALL
  90. ###############################################################################
  91. #
  92. # perform work that needs to be done immediately before resumption and syscall
  93. # tracing
  94. #
  95. ###############################################################################
  96. ALIGN
  97. syscall_exit_work:
  98. mov (REG_EPSW,fp),d0
  99. and EPSW_nSL,d0
  100. beq resume_kernel # returning to supervisor mode
  101. btst _TIF_SYSCALL_TRACE,d2
  102. beq work_pending
  103. LOCAL_IRQ_ENABLE # could let syscall_trace_exit() call
  104. # schedule() instead
  105. mov fp,d0
  106. call syscall_trace_exit[],0 # do_syscall_trace(regs)
  107. jmp resume_userspace
  108. ALIGN
  109. work_pending:
  110. btst _TIF_NEED_RESCHED,d2
  111. beq work_notifysig
  112. work_resched:
  113. call schedule[],0
  114. # make sure we don't miss an interrupt setting need_resched or
  115. # sigpending between sampling and the rti
  116. LOCAL_IRQ_DISABLE
  117. # is there any work to be done other than syscall tracing?
  118. mov (TI_flags,a2),d2
  119. btst _TIF_WORK_MASK,d2
  120. beq restore_all
  121. btst _TIF_NEED_RESCHED,d2
  122. bne work_resched
  123. # deal with pending signals and notify-resume requests
  124. work_notifysig:
  125. mov fp,d0
  126. mov d2,d1
  127. call do_notify_resume[],0
  128. jmp resume_userspace
  129. # perform syscall entry tracing
  130. syscall_entry_trace:
  131. mov -ENOSYS,d0
  132. mov d0,(REG_D0,fp)
  133. mov fp,d0
  134. call syscall_trace_entry[],0 # returns the syscall number to actually use
  135. mov (REG_D1,fp),d1
  136. cmp nr_syscalls,d0
  137. bcs syscall_call
  138. jmp syscall_exit
  139. syscall_badsys:
  140. mov -ENOSYS,d0
  141. mov d0,(REG_D0,fp)
  142. jmp resume_userspace
  143. # userspace resumption stub bypassing syscall exit tracing
  144. .globl ret_from_exception, ret_from_intr
  145. ALIGN
  146. ret_from_exception:
  147. preempt_stop
  148. ret_from_intr:
  149. GET_THREAD_INFO a2
  150. mov (REG_EPSW,fp),d0 # need to deliver signals before
  151. # returning to userspace
  152. and EPSW_nSL,d0
  153. beq resume_kernel # returning to supervisor mode
  154. ENTRY(resume_userspace)
  155. # make sure we don't miss an interrupt setting need_resched or
  156. # sigpending between sampling and the rti
  157. LOCAL_IRQ_DISABLE
  158. # is there any work to be done on int/exception return?
  159. mov (TI_flags,a2),d2
  160. btst _TIF_WORK_MASK,d2
  161. bne work_pending
  162. jmp restore_all
  163. #ifdef CONFIG_PREEMPT
  164. ENTRY(resume_kernel)
  165. LOCAL_IRQ_DISABLE
  166. mov (TI_preempt_count,a2),d0 # non-zero preempt_count ?
  167. cmp 0,d0
  168. bne restore_all
  169. need_resched:
  170. btst _TIF_NEED_RESCHED,(TI_flags,a2)
  171. beq restore_all
  172. mov (REG_EPSW,fp),d0
  173. and EPSW_IM,d0
  174. cmp EPSW_IM_7,d0 # interrupts off (exception path) ?
  175. bne restore_all
  176. call preempt_schedule_irq[],0
  177. jmp need_resched
  178. #endif
  179. ###############################################################################
  180. #
  181. # IRQ handler entry point
  182. # - intended to be entered at multiple priorities
  183. #
  184. ###############################################################################
  185. ENTRY(irq_handler)
  186. add -4,sp
  187. SAVE_ALL
  188. # it's not a syscall
  189. mov 0xffffffff,d0
  190. mov d0,(REG_ORIG_D0,fp)
  191. mov fp,d0
  192. call do_IRQ[],0 # do_IRQ(regs)
  193. jmp ret_from_intr
  194. ###############################################################################
  195. #
  196. # Double Fault handler entry point
  197. # - note that there will not be a stack, D0/A0 will hold EPSW/PC as were
  198. #
  199. ###############################################################################
  200. .section .bss
  201. .balign THREAD_SIZE
  202. .space THREAD_SIZE
  203. __df_stack:
  204. .previous
  205. ENTRY(double_fault)
  206. mov a0,(__df_stack-4) # PC as was
  207. mov d0,(__df_stack-8) # EPSW as was
  208. mn10300_set_dbfleds # display 'db-f' on the LEDs
  209. mov 0xaa55aa55,d0
  210. mov d0,(__df_stack-12) # no ORIG_D0
  211. mov sp,a0 # save corrupted SP
  212. mov __df_stack-12,sp # emergency supervisor stack
  213. SAVE_ALL
  214. mov a0,(REG_A0,fp) # save corrupted SP as A0 (which got
  215. # clobbered by the CPU)
  216. mov fp,d0
  217. calls do_double_fault
  218. double_fault_loop:
  219. bra double_fault_loop
  220. ###############################################################################
  221. #
  222. # Bus Error handler entry point
  223. # - handle external (async) bus errors separately
  224. #
  225. ###############################################################################
  226. ENTRY(raw_bus_error)
  227. add -4,sp
  228. mov d0,(sp)
  229. #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
  230. mov (MMUCTR),d0
  231. mov d0,(MMUCTR)
  232. #endif
  233. mov (BCBERR),d0 # what
  234. btst BCBERR_BEMR_DMA,d0 # see if it was an external bus error
  235. beq __common_exception_aux # it wasn't
  236. SAVE_ALL
  237. mov (BCBEAR),d1 # destination of erroneous access
  238. mov (REG_ORIG_D0,fp),d2
  239. mov d2,(REG_D0,fp)
  240. mov -1,d2
  241. mov d2,(REG_ORIG_D0,fp)
  242. add -4,sp
  243. mov fp,(12,sp) # frame pointer
  244. call io_bus_error[],0
  245. jmp restore_all
  246. ###############################################################################
  247. #
  248. # NMI exception entry points
  249. #
  250. # This is used by ordinary interrupt channels that have the GxICR_NMI bit set
  251. # in addition to the main NMI and Watchdog channels. SMP NMI IPIs use this
  252. # facility.
  253. #
  254. ###############################################################################
  255. ENTRY(nmi_handler)
  256. add -4,sp
  257. mov d0,(sp)
  258. mov (TBR),d0
  259. #ifdef CONFIG_SMP
  260. add -4,sp
  261. mov d0,(sp) # save d0(TBR)
  262. movhu (NMIAGR),d0
  263. and NMIAGR_GN,d0
  264. lsr 0x2,d0
  265. cmp CALL_FUNCTION_NMI_IPI,d0
  266. bne nmi_not_smp_callfunc # if not call function, jump
  267. # function call nmi ipi
  268. add 4,sp # no need to store TBR
  269. mov GxICR_DETECT,d0 # clear NMI request
  270. movbu d0,(GxICR(CALL_FUNCTION_NMI_IPI))
  271. movhu (GxICR(CALL_FUNCTION_NMI_IPI)),d0
  272. and ~EPSW_NMID,epsw # enable NMI
  273. mov (sp),d0 # restore d0
  274. SAVE_ALL
  275. call smp_nmi_call_function_interrupt[],0
  276. RESTORE_ALL
  277. nmi_not_smp_callfunc:
  278. #ifdef CONFIG_KERNEL_DEBUGGER
  279. cmp DEBUGGER_NMI_IPI,d0
  280. bne nmi_not_debugger # if not kernel debugger NMI IPI, jump
  281. # kernel debugger NMI IPI
  282. add 4,sp # no need to store TBR
  283. mov GxICR_DETECT,d0 # clear NMI
  284. movbu d0,(GxICR(DEBUGGER_NMI_IPI))
  285. movhu (GxICR(DEBUGGER_NMI_IPI)),d0
  286. and ~EPSW_NMID,epsw # enable NMI
  287. mov (sp),d0
  288. SAVE_ALL
  289. mov fp,d0 # arg 0: stacked register file
  290. mov a2,d1 # arg 1: exception number
  291. call debugger_nmi_interrupt[],0
  292. RESTORE_ALL
  293. nmi_not_debugger:
  294. #endif /* CONFIG_KERNEL_DEBUGGER */
  295. mov (sp),d0 # restore TBR to d0
  296. add 4,sp
  297. #endif /* CONFIG_SMP */
  298. bra __common_exception_nonmi
  299. ###############################################################################
  300. #
  301. # General exception entry point
  302. #
  303. ###############################################################################
  304. ENTRY(__common_exception)
  305. add -4,sp
  306. mov d0,(sp)
  307. #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
  308. mov (MMUCTR),d0
  309. mov d0,(MMUCTR)
  310. #endif
  311. __common_exception_aux:
  312. mov (TBR),d0
  313. and ~EPSW_NMID,epsw # turn NMIs back on if not NMI
  314. or EPSW_IE,epsw
  315. __common_exception_nonmi:
  316. and 0x0000FFFF,d0 # turn the exception code into a vector
  317. # table index
  318. btst 0x00000007,d0
  319. bne 1f
  320. cmp 0x00000400,d0
  321. bge 1f
  322. SAVE_ALL # build the stack frame
  323. mov (REG_D0,fp),a2 # get the exception number
  324. mov (REG_ORIG_D0,fp),d0
  325. mov d0,(REG_D0,fp)
  326. mov -1,d0
  327. mov d0,(REG_ORIG_D0,fp)
  328. #ifdef CONFIG_GDBSTUB
  329. #ifdef CONFIG_SMP
  330. call gdbstub_busy_check[],0
  331. and d0,d0 # check return value
  332. beq 2f
  333. #else /* CONFIG_SMP */
  334. btst 0x01,(gdbstub_busy)
  335. beq 2f
  336. #endif /* CONFIG_SMP */
  337. and ~EPSW_IE,epsw
  338. mov fp,d0
  339. mov a2,d1
  340. call gdbstub_exception[],0 # gdbstub itself caused an exception
  341. bra restore_all
  342. 2:
  343. #endif /* CONFIG_GDBSTUB */
  344. mov fp,d0 # arg 0: stacked register file
  345. mov a2,d1 # arg 1: exception number
  346. lsr 1,a2
  347. mov (exception_table,a2),a2
  348. calls (a2)
  349. jmp ret_from_exception
  350. 1: pi # BUG() equivalent
  351. ###############################################################################
  352. #
  353. # Exception handler functions table
  354. #
  355. ###############################################################################
  356. .data
  357. ENTRY(exception_table)
  358. .rept 0x400>>1
  359. .long uninitialised_exception
  360. .endr
  361. .previous
  362. ###############################################################################
  363. #
  364. # Change an entry in the exception table
  365. # - D0 exception code, D1 handler
  366. #
  367. ###############################################################################
  368. ENTRY(set_excp_vector)
  369. lsr 1,d0
  370. add exception_table,d0
  371. mov d1,(d0)
  372. mov 4,d1
  373. ret [],0
  374. ###############################################################################
  375. #
  376. # System call table
  377. #
  378. ###############################################################################
  379. .data
  380. ENTRY(sys_call_table)
  381. .long sys_restart_syscall /* 0 */
  382. .long sys_exit
  383. .long sys_fork
  384. .long sys_read
  385. .long sys_write
  386. .long sys_open /* 5 */
  387. .long sys_close
  388. .long sys_waitpid
  389. .long sys_creat
  390. .long sys_link
  391. .long sys_unlink /* 10 */
  392. .long sys_execve
  393. .long sys_chdir
  394. .long sys_time
  395. .long sys_mknod
  396. .long sys_chmod /* 15 */
  397. .long sys_lchown16
  398. .long sys_ni_syscall /* old break syscall holder */
  399. .long sys_stat
  400. .long sys_lseek
  401. .long sys_getpid /* 20 */
  402. .long sys_mount
  403. .long sys_oldumount
  404. .long sys_setuid16
  405. .long sys_getuid16
  406. .long sys_stime /* 25 */
  407. .long sys_ptrace
  408. .long sys_alarm
  409. .long sys_fstat
  410. .long sys_pause
  411. .long sys_utime /* 30 */
  412. .long sys_ni_syscall /* old stty syscall holder */
  413. .long sys_ni_syscall /* old gtty syscall holder */
  414. .long sys_access
  415. .long sys_nice
  416. .long sys_ni_syscall /* 35 - old ftime syscall holder */
  417. .long sys_sync
  418. .long sys_kill
  419. .long sys_rename
  420. .long sys_mkdir
  421. .long sys_rmdir /* 40 */
  422. .long sys_dup
  423. .long sys_pipe
  424. .long sys_times
  425. .long sys_ni_syscall /* old prof syscall holder */
  426. .long sys_brk /* 45 */
  427. .long sys_setgid16
  428. .long sys_getgid16
  429. .long sys_signal
  430. .long sys_geteuid16
  431. .long sys_getegid16 /* 50 */
  432. .long sys_acct
  433. .long sys_umount /* recycled never used phys() */
  434. .long sys_ni_syscall /* old lock syscall holder */
  435. .long sys_ioctl
  436. .long sys_fcntl /* 55 */
  437. .long sys_ni_syscall /* old mpx syscall holder */
  438. .long sys_setpgid
  439. .long sys_ni_syscall /* old ulimit syscall holder */
  440. .long sys_ni_syscall /* old sys_olduname */
  441. .long sys_umask /* 60 */
  442. .long sys_chroot
  443. .long sys_ustat
  444. .long sys_dup2
  445. .long sys_getppid
  446. .long sys_getpgrp /* 65 */
  447. .long sys_setsid
  448. .long sys_sigaction
  449. .long sys_sgetmask
  450. .long sys_ssetmask
  451. .long sys_setreuid16 /* 70 */
  452. .long sys_setregid16
  453. .long sys_sigsuspend
  454. .long sys_sigpending
  455. .long sys_sethostname
  456. .long sys_setrlimit /* 75 */
  457. .long sys_old_getrlimit
  458. .long sys_getrusage
  459. .long sys_gettimeofday
  460. .long sys_settimeofday
  461. .long sys_getgroups16 /* 80 */
  462. .long sys_setgroups16
  463. .long sys_old_select
  464. .long sys_symlink
  465. .long sys_lstat
  466. .long sys_readlink /* 85 */
  467. .long sys_uselib
  468. .long sys_swapon
  469. .long sys_reboot
  470. .long sys_old_readdir
  471. .long old_mmap /* 90 */
  472. .long sys_munmap
  473. .long sys_truncate
  474. .long sys_ftruncate
  475. .long sys_fchmod
  476. .long sys_fchown16 /* 95 */
  477. .long sys_getpriority
  478. .long sys_setpriority
  479. .long sys_ni_syscall /* old profil syscall holder */
  480. .long sys_statfs
  481. .long sys_fstatfs /* 100 */
  482. .long sys_ni_syscall /* ioperm */
  483. .long sys_socketcall
  484. .long sys_syslog
  485. .long sys_setitimer
  486. .long sys_getitimer /* 105 */
  487. .long sys_newstat
  488. .long sys_newlstat
  489. .long sys_newfstat
  490. .long sys_ni_syscall /* old sys_uname */
  491. .long sys_ni_syscall /* 110 - iopl */
  492. .long sys_vhangup
  493. .long sys_ni_syscall /* old "idle" system call */
  494. .long sys_ni_syscall /* vm86old */
  495. .long sys_wait4
  496. .long sys_swapoff /* 115 */
  497. .long sys_sysinfo
  498. .long sys_ipc
  499. .long sys_fsync
  500. .long sys_sigreturn
  501. .long sys_clone /* 120 */
  502. .long sys_setdomainname
  503. .long sys_newuname
  504. .long sys_ni_syscall /* modify_ldt */
  505. .long sys_adjtimex
  506. .long sys_mprotect /* 125 */
  507. .long sys_sigprocmask
  508. .long sys_ni_syscall /* old "create_module" */
  509. .long sys_init_module
  510. .long sys_delete_module
  511. .long sys_ni_syscall /* 130: old "get_kernel_syms" */
  512. .long sys_quotactl
  513. .long sys_getpgid
  514. .long sys_fchdir
  515. .long sys_bdflush
  516. .long sys_sysfs /* 135 */
  517. .long sys_personality
  518. .long sys_ni_syscall /* reserved for afs_syscall */
  519. .long sys_setfsuid16
  520. .long sys_setfsgid16
  521. .long sys_llseek /* 140 */
  522. .long sys_getdents
  523. .long sys_select
  524. .long sys_flock
  525. .long sys_msync
  526. .long sys_readv /* 145 */
  527. .long sys_writev
  528. .long sys_getsid
  529. .long sys_fdatasync
  530. .long sys_sysctl
  531. .long sys_mlock /* 150 */
  532. .long sys_munlock
  533. .long sys_mlockall
  534. .long sys_munlockall
  535. .long sys_sched_setparam
  536. .long sys_sched_getparam /* 155 */
  537. .long sys_sched_setscheduler
  538. .long sys_sched_getscheduler
  539. .long sys_sched_yield
  540. .long sys_sched_get_priority_max
  541. .long sys_sched_get_priority_min /* 160 */
  542. .long sys_sched_rr_get_interval
  543. .long sys_nanosleep
  544. .long sys_mremap
  545. .long sys_setresuid16
  546. .long sys_getresuid16 /* 165 */
  547. .long sys_ni_syscall /* vm86 */
  548. .long sys_ni_syscall /* Old sys_query_module */
  549. .long sys_poll
  550. .long sys_ni_syscall /* was nfsservctl */
  551. .long sys_setresgid16 /* 170 */
  552. .long sys_getresgid16
  553. .long sys_prctl
  554. .long sys_rt_sigreturn
  555. .long sys_rt_sigaction
  556. .long sys_rt_sigprocmask /* 175 */
  557. .long sys_rt_sigpending
  558. .long sys_rt_sigtimedwait
  559. .long sys_rt_sigqueueinfo
  560. .long sys_rt_sigsuspend
  561. .long sys_pread64 /* 180 */
  562. .long sys_pwrite64
  563. .long sys_chown16
  564. .long sys_getcwd
  565. .long sys_capget
  566. .long sys_capset /* 185 */
  567. .long sys_sigaltstack
  568. .long sys_sendfile
  569. .long sys_ni_syscall /* reserved for streams1 */
  570. .long sys_ni_syscall /* reserved for streams2 */
  571. .long sys_vfork /* 190 */
  572. .long sys_getrlimit
  573. .long sys_mmap_pgoff
  574. .long sys_truncate64
  575. .long sys_ftruncate64
  576. .long sys_stat64 /* 195 */
  577. .long sys_lstat64
  578. .long sys_fstat64
  579. .long sys_lchown
  580. .long sys_getuid
  581. .long sys_getgid /* 200 */
  582. .long sys_geteuid
  583. .long sys_getegid
  584. .long sys_setreuid
  585. .long sys_setregid
  586. .long sys_getgroups /* 205 */
  587. .long sys_setgroups
  588. .long sys_fchown
  589. .long sys_setresuid
  590. .long sys_getresuid
  591. .long sys_setresgid /* 210 */
  592. .long sys_getresgid
  593. .long sys_chown
  594. .long sys_setuid
  595. .long sys_setgid
  596. .long sys_setfsuid /* 215 */
  597. .long sys_setfsgid
  598. .long sys_pivot_root
  599. .long sys_mincore
  600. .long sys_madvise
  601. .long sys_getdents64 /* 220 */
  602. .long sys_fcntl64
  603. .long sys_ni_syscall /* reserved for TUX */
  604. .long sys_ni_syscall
  605. .long sys_gettid
  606. .long sys_readahead /* 225 */
  607. .long sys_setxattr
  608. .long sys_lsetxattr
  609. .long sys_fsetxattr
  610. .long sys_getxattr
  611. .long sys_lgetxattr /* 230 */
  612. .long sys_fgetxattr
  613. .long sys_listxattr
  614. .long sys_llistxattr
  615. .long sys_flistxattr
  616. .long sys_removexattr /* 235 */
  617. .long sys_lremovexattr
  618. .long sys_fremovexattr
  619. .long sys_tkill
  620. .long sys_sendfile64
  621. .long sys_futex /* 240 */
  622. .long sys_sched_setaffinity
  623. .long sys_sched_getaffinity
  624. .long sys_ni_syscall /* sys_set_thread_area */
  625. .long sys_ni_syscall /* sys_get_thread_area */
  626. .long sys_io_setup /* 245 */
  627. .long sys_io_destroy
  628. .long sys_io_getevents
  629. .long sys_io_submit
  630. .long sys_io_cancel
  631. .long sys_fadvise64 /* 250 */
  632. .long sys_ni_syscall
  633. .long sys_exit_group
  634. .long sys_lookup_dcookie
  635. .long sys_epoll_create
  636. .long sys_epoll_ctl /* 255 */
  637. .long sys_epoll_wait
  638. .long sys_remap_file_pages
  639. .long sys_set_tid_address
  640. .long sys_timer_create
  641. .long sys_timer_settime /* 260 */
  642. .long sys_timer_gettime
  643. .long sys_timer_getoverrun
  644. .long sys_timer_delete
  645. .long sys_clock_settime
  646. .long sys_clock_gettime /* 265 */
  647. .long sys_clock_getres
  648. .long sys_clock_nanosleep
  649. .long sys_statfs64
  650. .long sys_fstatfs64
  651. .long sys_tgkill /* 270 */
  652. .long sys_utimes
  653. .long sys_fadvise64_64
  654. .long sys_ni_syscall /* sys_vserver */
  655. .long sys_mbind
  656. .long sys_get_mempolicy /* 275 */
  657. .long sys_set_mempolicy
  658. .long sys_mq_open
  659. .long sys_mq_unlink
  660. .long sys_mq_timedsend
  661. .long sys_mq_timedreceive /* 280 */
  662. .long sys_mq_notify
  663. .long sys_mq_getsetattr
  664. .long sys_kexec_load
  665. .long sys_waitid
  666. .long sys_ni_syscall /* 285 */ /* available */
  667. .long sys_add_key
  668. .long sys_request_key
  669. .long sys_keyctl
  670. .long sys_cacheflush
  671. .long sys_ioprio_set /* 290 */
  672. .long sys_ioprio_get
  673. .long sys_inotify_init
  674. .long sys_inotify_add_watch
  675. .long sys_inotify_rm_watch
  676. .long sys_migrate_pages /* 295 */
  677. .long sys_openat
  678. .long sys_mkdirat
  679. .long sys_mknodat
  680. .long sys_fchownat
  681. .long sys_futimesat /* 300 */
  682. .long sys_fstatat64
  683. .long sys_unlinkat
  684. .long sys_renameat
  685. .long sys_linkat
  686. .long sys_symlinkat /* 305 */
  687. .long sys_readlinkat
  688. .long sys_fchmodat
  689. .long sys_faccessat
  690. .long sys_pselect6
  691. .long sys_ppoll /* 310 */
  692. .long sys_unshare
  693. .long sys_set_robust_list
  694. .long sys_get_robust_list
  695. .long sys_splice
  696. .long sys_sync_file_range /* 315 */
  697. .long sys_tee
  698. .long sys_vmsplice
  699. .long sys_move_pages
  700. .long sys_getcpu
  701. .long sys_epoll_pwait /* 320 */
  702. .long sys_utimensat
  703. .long sys_signalfd
  704. .long sys_timerfd_create
  705. .long sys_eventfd
  706. .long sys_fallocate /* 325 */
  707. .long sys_timerfd_settime
  708. .long sys_timerfd_gettime
  709. .long sys_signalfd4
  710. .long sys_eventfd2
  711. .long sys_epoll_create1 /* 330 */
  712. .long sys_dup3
  713. .long sys_pipe2
  714. .long sys_inotify_init1
  715. .long sys_preadv
  716. .long sys_pwritev /* 335 */
  717. .long sys_rt_tgsigqueueinfo
  718. .long sys_perf_event_open
  719. .long sys_recvmmsg
  720. .long sys_setns
  721. nr_syscalls=(.-sys_call_table)/4