entry.S 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  1. /*
  2. * arch/s390/kernel/entry.S
  3. * S390 low-level entry points.
  4. *
  5. * Copyright (C) IBM Corp. 1999,2012
  6. * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
  7. * Hartmut Penner (hp@de.ibm.com),
  8. * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
  9. * Heiko Carstens <heiko.carstens@de.ibm.com>
  10. */
  11. #include <linux/init.h>
  12. #include <linux/linkage.h>
  13. #include <asm/cache.h>
  14. #include <asm/errno.h>
  15. #include <asm/ptrace.h>
  16. #include <asm/thread_info.h>
  17. #include <asm/asm-offsets.h>
  18. #include <asm/unistd.h>
  19. #include <asm/page.h>
  20. __PT_R0 = __PT_GPRS
  21. __PT_R1 = __PT_GPRS + 4
  22. __PT_R2 = __PT_GPRS + 8
  23. __PT_R3 = __PT_GPRS + 12
  24. __PT_R4 = __PT_GPRS + 16
  25. __PT_R5 = __PT_GPRS + 20
  26. __PT_R6 = __PT_GPRS + 24
  27. __PT_R7 = __PT_GPRS + 28
  28. __PT_R8 = __PT_GPRS + 32
  29. __PT_R9 = __PT_GPRS + 36
  30. __PT_R10 = __PT_GPRS + 40
  31. __PT_R11 = __PT_GPRS + 44
  32. __PT_R12 = __PT_GPRS + 48
  33. __PT_R13 = __PT_GPRS + 524
  34. __PT_R14 = __PT_GPRS + 56
  35. __PT_R15 = __PT_GPRS + 60
  36. _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \
  37. _TIF_MCCK_PENDING | _TIF_PER_TRAP )
  38. _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \
  39. _TIF_MCCK_PENDING)
  40. _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \
  41. _TIF_SYSCALL_TRACEPOINT)
  42. STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER
  43. STACK_SIZE = 1 << STACK_SHIFT
  44. #define BASED(name) name-system_call(%r13)
  45. .macro TRACE_IRQS_ON
  46. #ifdef CONFIG_TRACE_IRQFLAGS
  47. basr %r2,%r0
  48. l %r1,BASED(.Lhardirqs_on)
  49. basr %r14,%r1 # call trace_hardirqs_on_caller
  50. #endif
  51. .endm
  52. .macro TRACE_IRQS_OFF
  53. #ifdef CONFIG_TRACE_IRQFLAGS
  54. basr %r2,%r0
  55. l %r1,BASED(.Lhardirqs_off)
  56. basr %r14,%r1 # call trace_hardirqs_off_caller
  57. #endif
  58. .endm
  59. .macro LOCKDEP_SYS_EXIT
  60. #ifdef CONFIG_LOCKDEP
  61. tm __PT_PSW+1(%r11),0x01 # returning to user ?
  62. jz .+10
  63. l %r1,BASED(.Llockdep_sys_exit)
  64. basr %r14,%r1 # call lockdep_sys_exit
  65. #endif
  66. .endm
  67. .macro CHECK_STACK stacksize,savearea
  68. #ifdef CONFIG_CHECK_STACK
  69. tml %r15,\stacksize - CONFIG_STACK_GUARD
  70. la %r14,\savearea
  71. jz stack_overflow
  72. #endif
  73. .endm
  74. .macro SWITCH_ASYNC savearea,stack,shift
  75. tmh %r8,0x0001 # interrupting from user ?
  76. jnz 1f
  77. lr %r14,%r9
  78. sl %r14,BASED(.Lcritical_start)
  79. cl %r14,BASED(.Lcritical_length)
  80. jhe 0f
  81. la %r11,\savearea # inside critical section, do cleanup
  82. bras %r14,cleanup_critical
  83. tmh %r8,0x0001 # retest problem state after cleanup
  84. jnz 1f
  85. 0: l %r14,\stack # are we already on the target stack?
  86. slr %r14,%r15
  87. sra %r14,\shift
  88. jnz 1f
  89. CHECK_STACK 1<<\shift,\savearea
  90. j 2f
  91. 1: l %r15,\stack # load target stack
  92. 2: ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  93. la %r11,STACK_FRAME_OVERHEAD(%r15)
  94. .endm
  95. .macro ADD64 high,low,timer
  96. al \high,\timer
  97. al \low,4+\timer
  98. brc 12,.+8
  99. ahi \high,1
  100. .endm
  101. .macro SUB64 high,low,timer
  102. sl \high,\timer
  103. sl \low,4+\timer
  104. brc 3,.+8
  105. ahi \high,-1
  106. .endm
  107. .macro UPDATE_VTIME high,low,enter_timer
  108. lm \high,\low,__LC_EXIT_TIMER
  109. SUB64 \high,\low,\enter_timer
  110. ADD64 \high,\low,__LC_USER_TIMER
  111. stm \high,\low,__LC_USER_TIMER
  112. lm \high,\low,__LC_LAST_UPDATE_TIMER
  113. SUB64 \high,\low,__LC_EXIT_TIMER
  114. ADD64 \high,\low,__LC_SYSTEM_TIMER
  115. stm \high,\low,__LC_SYSTEM_TIMER
  116. mvc __LC_LAST_UPDATE_TIMER(8),\enter_timer
  117. .endm
  118. .macro REENABLE_IRQS
  119. st %r8,__LC_RETURN_PSW
  120. ni __LC_RETURN_PSW,0xbf
  121. ssm __LC_RETURN_PSW
  122. .endm
  123. .section .kprobes.text, "ax"
  124. /*
  125. * Scheduler resume function, called by switch_to
  126. * gpr2 = (task_struct *) prev
  127. * gpr3 = (task_struct *) next
  128. * Returns:
  129. * gpr2 = prev
  130. */
  131. ENTRY(__switch_to)
  132. l %r4,__THREAD_info(%r2) # get thread_info of prev
  133. l %r5,__THREAD_info(%r3) # get thread_info of next
  134. tm __TI_flags+3(%r4),_TIF_MCCK_PENDING # machine check pending?
  135. jz 0f
  136. ni __TI_flags+3(%r4),255-_TIF_MCCK_PENDING # clear flag in prev
  137. oi __TI_flags+3(%r5),_TIF_MCCK_PENDING # set it in next
  138. 0: stm %r6,%r15,__SF_GPRS(%r15) # store gprs of prev task
  139. st %r15,__THREAD_ksp(%r2) # store kernel stack of prev
  140. l %r15,__THREAD_ksp(%r3) # load kernel stack of next
  141. lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4
  142. lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task
  143. st %r3,__LC_CURRENT # store task struct of next
  144. mvc __LC_CURRENT_PID(4,%r0),__TASK_pid(%r3) # store pid of next
  145. st %r5,__LC_THREAD_INFO # store thread info of next
  146. ahi %r5,STACK_SIZE # end of kernel stack of next
  147. st %r5,__LC_KERNEL_STACK # store end of kernel stack
  148. br %r14
  149. __critical_start:
  150. /*
  151. * SVC interrupt handler routine. System calls are synchronous events and
  152. * are executed with interrupts enabled.
  153. */
  154. ENTRY(system_call)
  155. stpt __LC_SYNC_ENTER_TIMER
  156. sysc_stm:
  157. stm %r8,%r15,__LC_SAVE_AREA_SYNC
  158. l %r12,__LC_THREAD_INFO
  159. l %r13,__LC_SVC_NEW_PSW+4
  160. sysc_per:
  161. l %r15,__LC_KERNEL_STACK
  162. ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  163. la %r11,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
  164. sysc_vtime:
  165. UPDATE_VTIME %r8,%r9,__LC_SYNC_ENTER_TIMER
  166. stm %r0,%r7,__PT_R0(%r11)
  167. mvc __PT_R8(32,%r11),__LC_SAVE_AREA_SYNC
  168. mvc __PT_PSW(8,%r11),__LC_SVC_OLD_PSW
  169. mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC
  170. sysc_do_svc:
  171. oi __TI_flags+3(%r12),_TIF_SYSCALL
  172. lh %r8,__PT_INT_CODE+2(%r11)
  173. sla %r8,2 # shift and test for svc0
  174. jnz sysc_nr_ok
  175. # svc 0: system call number in %r1
  176. cl %r1,BASED(.Lnr_syscalls)
  177. jnl sysc_nr_ok
  178. sth %r1,__PT_INT_CODE+2(%r11)
  179. lr %r8,%r1
  180. sla %r8,2
  181. sysc_nr_ok:
  182. l %r10,BASED(.Lsys_call_table) # 31 bit system call table
  183. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  184. st %r2,__PT_ORIG_GPR2(%r11)
  185. st %r7,STACK_FRAME_OVERHEAD(%r15)
  186. l %r9,0(%r8,%r10) # get system call addr.
  187. tm __TI_flags+2(%r12),_TIF_TRACE >> 8
  188. jnz sysc_tracesys
  189. basr %r14,%r9 # call sys_xxxx
  190. st %r2,__PT_R2(%r11) # store return value
  191. sysc_return:
  192. LOCKDEP_SYS_EXIT
  193. sysc_tif:
  194. tm __PT_PSW+1(%r11),0x01 # returning to user ?
  195. jno sysc_restore
  196. tm __TI_flags+3(%r12),_TIF_WORK_SVC
  197. jnz sysc_work # check for work
  198. ni __TI_flags+3(%r12),255-_TIF_SYSCALL
  199. sysc_restore:
  200. mvc __LC_RETURN_PSW(8),__PT_PSW(%r11)
  201. stpt __LC_EXIT_TIMER
  202. lm %r0,%r15,__PT_R0(%r11)
  203. lpsw __LC_RETURN_PSW
  204. sysc_done:
  205. #
  206. # One of the work bits is on. Find out which one.
  207. #
  208. sysc_work:
  209. tm __TI_flags+3(%r12),_TIF_MCCK_PENDING
  210. jo sysc_mcck_pending
  211. tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
  212. jo sysc_reschedule
  213. tm __TI_flags+3(%r12),_TIF_SIGPENDING
  214. jo sysc_sigpending
  215. tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME
  216. jo sysc_notify_resume
  217. tm __TI_flags+3(%r12),_TIF_PER_TRAP
  218. jo sysc_singlestep
  219. j sysc_return # beware of critical section cleanup
  220. #
  221. # _TIF_NEED_RESCHED is set, call schedule
  222. #
  223. sysc_reschedule:
  224. l %r1,BASED(.Lschedule)
  225. la %r14,BASED(sysc_return)
  226. br %r1 # call schedule
  227. #
  228. # _TIF_MCCK_PENDING is set, call handler
  229. #
  230. sysc_mcck_pending:
  231. l %r1,BASED(.Lhandle_mcck)
  232. la %r14,BASED(sysc_return)
  233. br %r1 # TIF bit will be cleared by handler
  234. #
  235. # _TIF_SIGPENDING is set, call do_signal
  236. #
  237. sysc_sigpending:
  238. ni __TI_flags+3(%r12),255-_TIF_PER_TRAP # clear TIF_PER_TRAP
  239. lr %r2,%r11 # pass pointer to pt_regs
  240. l %r1,BASED(.Ldo_signal)
  241. basr %r14,%r1 # call do_signal
  242. tm __TI_flags+3(%r12),_TIF_SYSCALL
  243. jno sysc_return
  244. lm %r2,%r7,__PT_R2(%r11) # load svc arguments
  245. xr %r8,%r8 # svc 0 returns -ENOSYS
  246. clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2)
  247. jnl sysc_nr_ok # invalid svc number -> do svc 0
  248. lh %r8,__PT_INT_CODE+2(%r11) # load new svc number
  249. sla %r8,2
  250. j sysc_nr_ok # restart svc
  251. #
  252. # _TIF_NOTIFY_RESUME is set, call do_notify_resume
  253. #
  254. sysc_notify_resume:
  255. lr %r2,%r11 # pass pointer to pt_regs
  256. l %r1,BASED(.Ldo_notify_resume)
  257. la %r14,BASED(sysc_return)
  258. br %r1 # call do_notify_resume
  259. #
  260. # _TIF_PER_TRAP is set, call do_per_trap
  261. #
  262. sysc_singlestep:
  263. ni __TI_flags+3(%r12),255-(_TIF_SYSCALL | _TIF_PER_TRAP)
  264. lr %r2,%r11 # pass pointer to pt_regs
  265. l %r1,BASED(.Ldo_per_trap)
  266. la %r14,BASED(sysc_return)
  267. br %r1 # call do_per_trap
  268. #
  269. # call tracehook_report_syscall_entry/tracehook_report_syscall_exit before
  270. # and after the system call
  271. #
  272. sysc_tracesys:
  273. l %r1,BASED(.Ltrace_enter)
  274. lr %r2,%r11 # pass pointer to pt_regs
  275. la %r3,0
  276. xr %r0,%r0
  277. icm %r0,3,__PT_INT_CODE+2(%r11)
  278. st %r0,__PT_R2(%r11)
  279. basr %r14,%r1 # call do_syscall_trace_enter
  280. cl %r2,BASED(.Lnr_syscalls)
  281. jnl sysc_tracenogo
  282. lr %r8,%r2
  283. sll %r8,2
  284. l %r9,0(%r8,%r10)
  285. sysc_tracego:
  286. lm %r3,%r7,__PT_R3(%r11)
  287. st %r7,STACK_FRAME_OVERHEAD(%r15)
  288. l %r2,__PT_ORIG_GPR2(%r11)
  289. basr %r14,%r9 # call sys_xxx
  290. st %r2,__PT_R2(%r11) # store return value
  291. sysc_tracenogo:
  292. tm __TI_flags+2(%r12),_TIF_TRACE >> 8
  293. jz sysc_return
  294. l %r1,BASED(.Ltrace_exit)
  295. lr %r2,%r11 # pass pointer to pt_regs
  296. la %r14,BASED(sysc_return)
  297. br %r1 # call do_syscall_trace_exit
  298. #
  299. # a new process exits the kernel with ret_from_fork
  300. #
  301. ENTRY(ret_from_fork)
  302. la %r11,STACK_FRAME_OVERHEAD(%r15)
  303. l %r12,__LC_THREAD_INFO
  304. l %r13,__LC_SVC_NEW_PSW+4
  305. tm __PT_PSW+1(%r11),0x01 # forking a kernel thread ?
  306. jo 0f
  307. st %r15,__PT_R15(%r11) # store stack pointer for new kthread
  308. 0: l %r1,BASED(.Lschedule_tail)
  309. basr %r14,%r1 # call schedule_tail
  310. TRACE_IRQS_ON
  311. ssm __LC_SVC_NEW_PSW # reenable interrupts
  312. j sysc_tracenogo
  313. #
  314. # kernel_execve function needs to deal with pt_regs that is not
  315. # at the usual place
  316. #
  317. ENTRY(kernel_execve)
  318. stm %r12,%r15,48(%r15)
  319. lr %r14,%r15
  320. l %r13,__LC_SVC_NEW_PSW+4
  321. ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  322. st %r14,__SF_BACKCHAIN(%r15)
  323. la %r12,STACK_FRAME_OVERHEAD(%r15)
  324. xc 0(__PT_SIZE,%r12),0(%r12)
  325. l %r1,BASED(.Ldo_execve)
  326. lr %r5,%r12
  327. basr %r14,%r1 # call do_execve
  328. ltr %r2,%r2
  329. je 0f
  330. ahi %r15,(STACK_FRAME_OVERHEAD + __PT_SIZE)
  331. lm %r12,%r15,48(%r15)
  332. br %r14
  333. # execve succeeded.
  334. 0: ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
  335. l %r15,__LC_KERNEL_STACK # load ksp
  336. ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  337. la %r11,STACK_FRAME_OVERHEAD(%r15)
  338. mvc 0(__PT_SIZE,%r11),0(%r12) # copy pt_regs
  339. l %r12,__LC_THREAD_INFO
  340. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  341. ssm __LC_SVC_NEW_PSW # reenable interrupts
  342. l %r1,BASED(.Lexecve_tail)
  343. basr %r14,%r1 # call execve_tail
  344. j sysc_return
  345. /*
  346. * Program check handler routine
  347. */
  348. ENTRY(pgm_check_handler)
  349. stpt __LC_SYNC_ENTER_TIMER
  350. stm %r8,%r15,__LC_SAVE_AREA_SYNC
  351. l %r12,__LC_THREAD_INFO
  352. l %r13,__LC_SVC_NEW_PSW+4
  353. lm %r8,%r9,__LC_PGM_OLD_PSW
  354. tmh %r8,0x0001 # test problem state bit
  355. jnz 1f # -> fault in user space
  356. tmh %r8,0x4000 # PER bit set in old PSW ?
  357. jnz 0f # -> enabled, can't be a double fault
  358. tm __LC_PGM_ILC+3,0x80 # check for per exception
  359. jnz pgm_svcper # -> single stepped svc
  360. 0: CHECK_STACK STACK_SIZE,__LC_SAVE_AREA_SYNC
  361. j 2f
  362. 1: UPDATE_VTIME %r14,%r15,__LC_SYNC_ENTER_TIMER
  363. l %r15,__LC_KERNEL_STACK
  364. 2: ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  365. la %r11,STACK_FRAME_OVERHEAD(%r15)
  366. stm %r0,%r7,__PT_R0(%r11)
  367. mvc __PT_R8(32,%r11),__LC_SAVE_AREA_SYNC
  368. stm %r8,%r9,__PT_PSW(%r11)
  369. mvc __PT_INT_CODE(4,%r11),__LC_PGM_ILC
  370. mvc __PT_INT_PARM_LONG(4,%r11),__LC_TRANS_EXC_CODE
  371. tm __LC_PGM_ILC+3,0x80 # check for per exception
  372. jz 0f
  373. l %r1,__TI_task(%r12)
  374. tmh %r8,0x0001 # kernel per event ?
  375. jz pgm_kprobe
  376. oi __TI_flags+3(%r12),_TIF_PER_TRAP
  377. mvc __THREAD_per_address(4,%r1),__LC_PER_ADDRESS
  378. mvc __THREAD_per_cause(2,%r1),__LC_PER_CAUSE
  379. mvc __THREAD_per_paid(1,%r1),__LC_PER_PAID
  380. 0: REENABLE_IRQS
  381. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  382. l %r1,BASED(.Ljump_table)
  383. la %r10,0x7f
  384. n %r10,__PT_INT_CODE(%r11)
  385. je sysc_return
  386. sll %r10,2
  387. l %r1,0(%r10,%r1) # load address of handler routine
  388. lr %r2,%r11 # pass pointer to pt_regs
  389. basr %r14,%r1 # branch to interrupt-handler
  390. j sysc_return
  391. #
  392. # PER event in supervisor state, must be kprobes
  393. #
  394. pgm_kprobe:
  395. REENABLE_IRQS
  396. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  397. l %r1,BASED(.Ldo_per_trap)
  398. lr %r2,%r11 # pass pointer to pt_regs
  399. basr %r14,%r1 # call do_per_trap
  400. j sysc_return
  401. #
  402. # single stepped system call
  403. #
  404. pgm_svcper:
  405. oi __TI_flags+3(%r12),_TIF_PER_TRAP
  406. mvc __LC_RETURN_PSW(4),__LC_SVC_NEW_PSW
  407. mvc __LC_RETURN_PSW+4(4),BASED(.Lsysc_per)
  408. lpsw __LC_RETURN_PSW # branch to sysc_per and enable irqs
  409. /*
  410. * IO interrupt handler routine
  411. */
  412. ENTRY(io_int_handler)
  413. stck __LC_INT_CLOCK
  414. stpt __LC_ASYNC_ENTER_TIMER
  415. stm %r8,%r15,__LC_SAVE_AREA_ASYNC
  416. l %r12,__LC_THREAD_INFO
  417. l %r13,__LC_SVC_NEW_PSW+4
  418. lm %r8,%r9,__LC_IO_OLD_PSW
  419. tmh %r8,0x0001 # interrupting from user ?
  420. jz io_skip
  421. UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER
  422. io_skip:
  423. SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT
  424. stm %r0,%r7,__PT_R0(%r11)
  425. mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC
  426. stm %r8,%r9,__PT_PSW(%r11)
  427. TRACE_IRQS_OFF
  428. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  429. l %r1,BASED(.Ldo_IRQ)
  430. lr %r2,%r11 # pass pointer to pt_regs
  431. basr %r14,%r1 # call do_IRQ
  432. io_return:
  433. LOCKDEP_SYS_EXIT
  434. TRACE_IRQS_ON
  435. io_tif:
  436. tm __TI_flags+3(%r12),_TIF_WORK_INT
  437. jnz io_work # there is work to do (signals etc.)
  438. io_restore:
  439. mvc __LC_RETURN_PSW(8),__PT_PSW(%r11)
  440. stpt __LC_EXIT_TIMER
  441. lm %r0,%r15,__PT_R0(%r11)
  442. lpsw __LC_RETURN_PSW
  443. io_done:
  444. #
  445. # There is work todo, find out in which context we have been interrupted:
  446. # 1) if we return to user space we can do all _TIF_WORK_INT work
  447. # 2) if we return to kernel code and preemptive scheduling is enabled check
  448. # the preemption counter and if it is zero call preempt_schedule_irq
  449. # Before any work can be done, a switch to the kernel stack is required.
  450. #
  451. io_work:
  452. tm __PT_PSW+1(%r11),0x01 # returning to user ?
  453. jo io_work_user # yes -> do resched & signal
  454. #ifdef CONFIG_PREEMPT
  455. # check for preemptive scheduling
  456. icm %r0,15,__TI_precount(%r12)
  457. jnz io_restore # preemption disabled
  458. tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
  459. jno io_restore
  460. # switch to kernel stack
  461. l %r1,__PT_R15(%r11)
  462. ahi %r1,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  463. mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11)
  464. xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
  465. la %r11,STACK_FRAME_OVERHEAD(%r1)
  466. lr %r15,%r1
  467. # TRACE_IRQS_ON already done at io_return, call
  468. # TRACE_IRQS_OFF to keep things symmetrical
  469. TRACE_IRQS_OFF
  470. l %r1,BASED(.Lpreempt_irq)
  471. basr %r14,%r1 # call preempt_schedule_irq
  472. j io_return
  473. #else
  474. j io_restore
  475. #endif
  476. #
  477. # Need to do work before returning to userspace, switch to kernel stack
  478. #
  479. io_work_user:
  480. l %r1,__LC_KERNEL_STACK
  481. ahi %r1,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  482. mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11)
  483. xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
  484. la %r11,STACK_FRAME_OVERHEAD(%r1)
  485. lr %r15,%r1
  486. #
  487. # One of the work bits is on. Find out which one.
  488. # Checked are: _TIF_SIGPENDING, _TIF_NOTIFY_RESUME, _TIF_NEED_RESCHED
  489. # and _TIF_MCCK_PENDING
  490. #
  491. io_work_tif:
  492. tm __TI_flags+3(%r12),_TIF_MCCK_PENDING
  493. jo io_mcck_pending
  494. tm __TI_flags+3(%r12),_TIF_NEED_RESCHED
  495. jo io_reschedule
  496. tm __TI_flags+3(%r12),_TIF_SIGPENDING
  497. jo io_sigpending
  498. tm __TI_flags+3(%r12),_TIF_NOTIFY_RESUME
  499. jo io_notify_resume
  500. j io_return # beware of critical section cleanup
  501. #
  502. # _TIF_MCCK_PENDING is set, call handler
  503. #
  504. io_mcck_pending:
  505. # TRACE_IRQS_ON already done at io_return
  506. l %r1,BASED(.Lhandle_mcck)
  507. basr %r14,%r1 # TIF bit will be cleared by handler
  508. TRACE_IRQS_OFF
  509. j io_return
  510. #
  511. # _TIF_NEED_RESCHED is set, call schedule
  512. #
  513. io_reschedule:
  514. # TRACE_IRQS_ON already done at io_return
  515. l %r1,BASED(.Lschedule)
  516. ssm __LC_SVC_NEW_PSW # reenable interrupts
  517. basr %r14,%r1 # call scheduler
  518. ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
  519. TRACE_IRQS_OFF
  520. j io_return
  521. #
  522. # _TIF_SIGPENDING is set, call do_signal
  523. #
  524. io_sigpending:
  525. # TRACE_IRQS_ON already done at io_return
  526. l %r1,BASED(.Ldo_signal)
  527. ssm __LC_SVC_NEW_PSW # reenable interrupts
  528. lr %r2,%r11 # pass pointer to pt_regs
  529. basr %r14,%r1 # call do_signal
  530. ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
  531. TRACE_IRQS_OFF
  532. j io_return
  533. #
  534. # _TIF_SIGPENDING is set, call do_signal
  535. #
  536. io_notify_resume:
  537. # TRACE_IRQS_ON already done at io_return
  538. l %r1,BASED(.Ldo_notify_resume)
  539. ssm __LC_SVC_NEW_PSW # reenable interrupts
  540. lr %r2,%r11 # pass pointer to pt_regs
  541. basr %r14,%r1 # call do_notify_resume
  542. ssm __LC_PGM_NEW_PSW # disable I/O and ext. interrupts
  543. TRACE_IRQS_OFF
  544. j io_return
  545. /*
  546. * External interrupt handler routine
  547. */
  548. ENTRY(ext_int_handler)
  549. stck __LC_INT_CLOCK
  550. stpt __LC_ASYNC_ENTER_TIMER
  551. stm %r8,%r15,__LC_SAVE_AREA_ASYNC
  552. l %r12,__LC_THREAD_INFO
  553. l %r13,__LC_SVC_NEW_PSW+4
  554. lm %r8,%r9,__LC_EXT_OLD_PSW
  555. tmh %r8,0x0001 # interrupting from user ?
  556. jz ext_skip
  557. UPDATE_VTIME %r14,%r15,__LC_ASYNC_ENTER_TIMER
  558. ext_skip:
  559. SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_STACK,STACK_SHIFT
  560. stm %r0,%r7,__PT_R0(%r11)
  561. mvc __PT_R8(32,%r11),__LC_SAVE_AREA_ASYNC
  562. stm %r8,%r9,__PT_PSW(%r11)
  563. TRACE_IRQS_OFF
  564. lr %r2,%r11 # pass pointer to pt_regs
  565. l %r3,__LC_EXT_CPU_ADDR # get cpu address + interruption code
  566. l %r4,__LC_EXT_PARAMS # get external parameters
  567. l %r1,BASED(.Ldo_extint)
  568. basr %r14,%r1 # call do_extint
  569. j io_return
  570. /*
  571. * Load idle PSW. The second "half" of this function is in cleanup_idle.
  572. */
  573. ENTRY(psw_idle)
  574. st %r4,__SF_EMPTY(%r15)
  575. basr %r1,0
  576. la %r1,psw_idle_lpsw+4-.(%r1)
  577. st %r1,__SF_EMPTY+4(%r15)
  578. oi __SF_EMPTY+4(%r15),0x80
  579. la %r1,.Lvtimer_max-psw_idle_lpsw-4(%r1)
  580. stck __IDLE_ENTER(%r2)
  581. ltr %r5,%r5
  582. stpt __VQ_IDLE_ENTER(%r3)
  583. jz psw_idle_lpsw
  584. spt 0(%r1)
  585. psw_idle_lpsw:
  586. lpsw __SF_EMPTY(%r15)
  587. br %r14
  588. psw_idle_end:
  589. __critical_end:
  590. /*
  591. * Machine check handler routines
  592. */
  593. ENTRY(mcck_int_handler)
  594. stck __LC_MCCK_CLOCK
  595. spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer
  596. lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs
  597. l %r12,__LC_THREAD_INFO
  598. l %r13,__LC_SVC_NEW_PSW+4
  599. lm %r8,%r9,__LC_MCK_OLD_PSW
  600. tm __LC_MCCK_CODE,0x80 # system damage?
  601. jo mcck_panic # yes -> rest of mcck code invalid
  602. la %r14,__LC_CPU_TIMER_SAVE_AREA
  603. mvc __LC_MCCK_ENTER_TIMER(8),0(%r14)
  604. tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid?
  605. jo 3f
  606. la %r14,__LC_SYNC_ENTER_TIMER
  607. clc 0(8,%r14),__LC_ASYNC_ENTER_TIMER
  608. jl 0f
  609. la %r14,__LC_ASYNC_ENTER_TIMER
  610. 0: clc 0(8,%r14),__LC_EXIT_TIMER
  611. jl 1f
  612. la %r14,__LC_EXIT_TIMER
  613. 1: clc 0(8,%r14),__LC_LAST_UPDATE_TIMER
  614. jl 2f
  615. la %r14,__LC_LAST_UPDATE_TIMER
  616. 2: spt 0(%r14)
  617. mvc __LC_MCCK_ENTER_TIMER(8),0(%r14)
  618. 3: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid?
  619. jno mcck_panic # no -> skip cleanup critical
  620. tm %r8,0x0001 # interrupting from user ?
  621. jz mcck_skip
  622. UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER
  623. mcck_skip:
  624. SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT
  625. stm %r0,%r7,__PT_R0(%r11)
  626. mvc __PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32
  627. stm %r8,%r9,__PT_PSW(%r11)
  628. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  629. l %r1,BASED(.Ldo_machine_check)
  630. lr %r2,%r11 # pass pointer to pt_regs
  631. basr %r14,%r1 # call s390_do_machine_check
  632. tm __PT_PSW+1(%r11),0x01 # returning to user ?
  633. jno mcck_return
  634. l %r1,__LC_KERNEL_STACK # switch to kernel stack
  635. ahi %r1,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  636. mvc STACK_FRAME_OVERHEAD(__PT_SIZE,%r1),0(%r11)
  637. xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1)
  638. la %r11,STACK_FRAME_OVERHEAD(%r15)
  639. lr %r15,%r1
  640. ssm __LC_PGM_NEW_PSW # turn dat on, keep irqs off
  641. tm __TI_flags+3(%r12),_TIF_MCCK_PENDING
  642. jno mcck_return
  643. TRACE_IRQS_OFF
  644. l %r1,BASED(.Lhandle_mcck)
  645. basr %r14,%r1 # call s390_handle_mcck
  646. TRACE_IRQS_ON
  647. mcck_return:
  648. mvc __LC_RETURN_MCCK_PSW(8),__PT_PSW(%r11) # move return PSW
  649. tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ?
  650. jno 0f
  651. lm %r0,%r15,__PT_R0(%r11)
  652. stpt __LC_EXIT_TIMER
  653. lpsw __LC_RETURN_MCCK_PSW
  654. 0: lm %r0,%r15,__PT_R0(%r11)
  655. lpsw __LC_RETURN_MCCK_PSW
  656. mcck_panic:
  657. l %r14,__LC_PANIC_STACK
  658. slr %r14,%r15
  659. sra %r14,PAGE_SHIFT
  660. jz 0f
  661. l %r15,__LC_PANIC_STACK
  662. 0: ahi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
  663. j mcck_skip
  664. #
  665. # PSW restart interrupt handler
  666. #
  667. ENTRY(restart_int_handler)
  668. st %r15,__LC_SAVE_AREA_RESTART
  669. l %r15,__LC_RESTART_STACK
  670. ahi %r15,-__PT_SIZE # create pt_regs on stack
  671. xc 0(__PT_SIZE,%r15),0(%r15)
  672. stm %r0,%r14,__PT_R0(%r15)
  673. mvc __PT_R15(4,%r15),__LC_SAVE_AREA_RESTART
  674. mvc __PT_PSW(8,%r15),__LC_RST_OLD_PSW # store restart old psw
  675. ahi %r15,-STACK_FRAME_OVERHEAD # create stack frame on stack
  676. xc 0(STACK_FRAME_OVERHEAD,%r15),0(%r15)
  677. lm %r1,%r3,__LC_RESTART_FN # load fn, parm & source cpu
  678. ltr %r3,%r3 # test source cpu address
  679. jm 1f # negative -> skip source stop
  680. 0: sigp %r4,%r3,1 # sigp sense to source cpu
  681. brc 10,0b # wait for status stored
  682. 1: basr %r14,%r1 # call function
  683. stap __SF_EMPTY(%r15) # store cpu address
  684. lh %r3,__SF_EMPTY(%r15)
  685. 2: sigp %r4,%r3,5 # sigp stop to current cpu
  686. brc 2,2b
  687. 3: j 3b
  688. .section .kprobes.text, "ax"
  689. #ifdef CONFIG_CHECK_STACK
  690. /*
  691. * The synchronous or the asynchronous stack overflowed. We are dead.
  692. * No need to properly save the registers, we are going to panic anyway.
  693. * Setup a pt_regs so that show_trace can provide a good call trace.
  694. */
  695. stack_overflow:
  696. l %r15,__LC_PANIC_STACK # change to panic stack
  697. ahi %r15,-__PT_SIZE # create pt_regs
  698. stm %r0,%r7,__PT_R0(%r15)
  699. stm %r8,%r9,__PT_PSW(%r15)
  700. mvc __PT_R8(32,%r11),0(%r14)
  701. lr %r15,%r11
  702. ahi %r15,-STACK_FRAME_OVERHEAD
  703. l %r1,BASED(1f)
  704. xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
  705. lr %r2,%r11 # pass pointer to pt_regs
  706. br %r1 # branch to kernel_stack_overflow
  707. 1: .long kernel_stack_overflow
  708. #endif
  709. cleanup_table:
  710. .long system_call + 0x80000000
  711. .long sysc_do_svc + 0x80000000
  712. .long sysc_tif + 0x80000000
  713. .long sysc_restore + 0x80000000
  714. .long sysc_done + 0x80000000
  715. .long io_tif + 0x80000000
  716. .long io_restore + 0x80000000
  717. .long io_done + 0x80000000
  718. .long psw_idle + 0x80000000
  719. .long psw_idle_end + 0x80000000
  720. cleanup_critical:
  721. cl %r9,BASED(cleanup_table) # system_call
  722. jl 0f
  723. cl %r9,BASED(cleanup_table+4) # sysc_do_svc
  724. jl cleanup_system_call
  725. cl %r9,BASED(cleanup_table+8) # sysc_tif
  726. jl 0f
  727. cl %r9,BASED(cleanup_table+12) # sysc_restore
  728. jl cleanup_sysc_tif
  729. cl %r9,BASED(cleanup_table+16) # sysc_done
  730. jl cleanup_sysc_restore
  731. cl %r9,BASED(cleanup_table+20) # io_tif
  732. jl 0f
  733. cl %r9,BASED(cleanup_table+24) # io_restore
  734. jl cleanup_io_tif
  735. cl %r9,BASED(cleanup_table+28) # io_done
  736. jl cleanup_io_restore
  737. cl %r9,BASED(cleanup_table+32) # psw_idle
  738. jl 0f
  739. cl %r9,BASED(cleanup_table+36) # psw_idle_end
  740. jl cleanup_idle
  741. 0: br %r14
  742. cleanup_system_call:
  743. # check if stpt has been executed
  744. cl %r9,BASED(cleanup_system_call_insn)
  745. jh 0f
  746. mvc __LC_SYNC_ENTER_TIMER(8),__LC_ASYNC_ENTER_TIMER
  747. chi %r11,__LC_SAVE_AREA_ASYNC
  748. je 0f
  749. mvc __LC_SYNC_ENTER_TIMER(8),__LC_MCCK_ENTER_TIMER
  750. 0: # check if stm has been executed
  751. cl %r9,BASED(cleanup_system_call_insn+4)
  752. jh 0f
  753. mvc __LC_SAVE_AREA_SYNC(32),0(%r11)
  754. 0: # set up saved registers r12, and r13
  755. st %r12,16(%r11) # r12 thread-info pointer
  756. st %r13,20(%r11) # r13 literal-pool pointer
  757. # check if the user time calculation has been done
  758. cl %r9,BASED(cleanup_system_call_insn+8)
  759. jh 0f
  760. l %r10,__LC_EXIT_TIMER
  761. l %r15,__LC_EXIT_TIMER+4
  762. SUB64 %r10,%r15,__LC_SYNC_ENTER_TIMER
  763. ADD64 %r10,%r15,__LC_USER_TIMER
  764. st %r10,__LC_USER_TIMER
  765. st %r15,__LC_USER_TIMER+4
  766. 0: # check if the system time calculation has been done
  767. cl %r9,BASED(cleanup_system_call_insn+12)
  768. jh 0f
  769. l %r10,__LC_LAST_UPDATE_TIMER
  770. l %r15,__LC_LAST_UPDATE_TIMER+4
  771. SUB64 %r10,%r15,__LC_EXIT_TIMER
  772. ADD64 %r10,%r15,__LC_SYSTEM_TIMER
  773. st %r10,__LC_SYSTEM_TIMER
  774. st %r15,__LC_SYSTEM_TIMER+4
  775. 0: # update accounting time stamp
  776. mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
  777. # set up saved register 11
  778. l %r15,__LC_KERNEL_STACK
  779. ahi %r15,-__PT_SIZE
  780. st %r15,12(%r11) # r11 pt_regs pointer
  781. # fill pt_regs
  782. mvc __PT_R8(32,%r15),__LC_SAVE_AREA_SYNC
  783. stm %r0,%r7,__PT_R0(%r15)
  784. mvc __PT_PSW(8,%r15),__LC_SVC_OLD_PSW
  785. mvc __PT_INT_CODE(4,%r15),__LC_SVC_ILC
  786. # setup saved register 15
  787. ahi %r15,-STACK_FRAME_OVERHEAD
  788. st %r15,28(%r11) # r15 stack pointer
  789. # set new psw address and exit
  790. l %r9,BASED(cleanup_table+4) # sysc_do_svc + 0x80000000
  791. br %r14
  792. cleanup_system_call_insn:
  793. .long system_call + 0x80000000
  794. .long sysc_stm + 0x80000000
  795. .long sysc_vtime + 0x80000000 + 36
  796. .long sysc_vtime + 0x80000000 + 76
  797. cleanup_sysc_tif:
  798. l %r9,BASED(cleanup_table+8) # sysc_tif + 0x80000000
  799. br %r14
  800. cleanup_sysc_restore:
  801. cl %r9,BASED(cleanup_sysc_restore_insn)
  802. jhe 0f
  803. l %r9,12(%r11) # get saved pointer to pt_regs
  804. mvc __LC_RETURN_PSW(8),__PT_PSW(%r9)
  805. mvc 0(32,%r11),__PT_R8(%r9)
  806. lm %r0,%r7,__PT_R0(%r9)
  807. 0: lm %r8,%r9,__LC_RETURN_PSW
  808. br %r14
  809. cleanup_sysc_restore_insn:
  810. .long sysc_done - 4 + 0x80000000
  811. cleanup_io_tif:
  812. l %r9,BASED(cleanup_table+20) # io_tif + 0x80000000
  813. br %r14
  814. cleanup_io_restore:
  815. cl %r9,BASED(cleanup_io_restore_insn)
  816. jhe 0f
  817. l %r9,12(%r11) # get saved r11 pointer to pt_regs
  818. mvc __LC_RETURN_PSW(8),__PT_PSW(%r9)
  819. mvc 0(32,%r11),__PT_R8(%r9)
  820. lm %r0,%r7,__PT_R0(%r9)
  821. 0: lm %r8,%r9,__LC_RETURN_PSW
  822. br %r14
  823. cleanup_io_restore_insn:
  824. .long io_done - 4 + 0x80000000
  825. cleanup_idle:
  826. # copy interrupt clock & cpu timer
  827. mvc __IDLE_EXIT(8,%r2),__LC_INT_CLOCK
  828. mvc __VQ_IDLE_EXIT(8,%r3),__LC_ASYNC_ENTER_TIMER
  829. chi %r11,__LC_SAVE_AREA_ASYNC
  830. je 0f
  831. mvc __IDLE_EXIT(8,%r2),__LC_MCCK_CLOCK
  832. mvc __VQ_IDLE_EXIT(8,%r3),__LC_MCCK_ENTER_TIMER
  833. 0: # check if stck has been executed
  834. cl %r9,BASED(cleanup_idle_insn)
  835. jhe 1f
  836. mvc __IDLE_ENTER(8,%r2),__IDLE_EXIT(%r2)
  837. mvc __VQ_IDLE_ENTER(8,%r3),__VQ_IDLE_EXIT(%r3)
  838. j 2f
  839. 1: # check if the cpu timer has been reprogrammed
  840. ltr %r5,%r5
  841. jz 2f
  842. spt __VQ_IDLE_ENTER(%r3)
  843. 2: # account system time going idle
  844. lm %r9,%r10,__LC_STEAL_TIMER
  845. ADD64 %r9,%r10,__IDLE_ENTER(%r2)
  846. SUB64 %r9,%r10,__LC_LAST_UPDATE_CLOCK
  847. stm %r9,%r10,__LC_STEAL_TIMER
  848. mvc __LC_LAST_UPDATE_CLOCK(8),__IDLE_EXIT(%r2)
  849. lm %r9,%r10,__LC_SYSTEM_TIMER
  850. ADD64 %r9,%r10,__LC_LAST_UPDATE_TIMER
  851. SUB64 %r9,%r10,__VQ_IDLE_ENTER(%r3)
  852. stm %r9,%r10,__LC_SYSTEM_TIMER
  853. mvc __LC_LAST_UPDATE_TIMER(8),__VQ_IDLE_EXIT(%r3)
  854. # prepare return psw
  855. n %r8,BASED(cleanup_idle_wait) # clear wait state bit
  856. l %r9,24(%r11) # return from psw_idle
  857. br %r14
  858. cleanup_idle_insn:
  859. .long psw_idle_lpsw + 0x80000000
  860. cleanup_idle_wait:
  861. .long 0xfffdffff
  862. /*
  863. * Integer constants
  864. */
  865. .align 4
  866. .Lnr_syscalls:
  867. .long NR_syscalls
  868. .Lvtimer_max:
  869. .quad 0x7fffffffffffffff
  870. /*
  871. * Symbol constants
  872. */
  873. .Ldo_machine_check: .long s390_do_machine_check
  874. .Lhandle_mcck: .long s390_handle_mcck
  875. .Ldo_IRQ: .long do_IRQ
  876. .Ldo_extint: .long do_extint
  877. .Ldo_signal: .long do_signal
  878. .Ldo_notify_resume: .long do_notify_resume
  879. .Ldo_per_trap: .long do_per_trap
  880. .Ldo_execve: .long do_execve
  881. .Lexecve_tail: .long execve_tail
  882. .Ljump_table: .long pgm_check_table
  883. .Lschedule: .long schedule
  884. #ifdef CONFIG_PREEMPT
  885. .Lpreempt_irq: .long preempt_schedule_irq
  886. #endif
  887. .Ltrace_enter: .long do_syscall_trace_enter
  888. .Ltrace_exit: .long do_syscall_trace_exit
  889. .Lschedule_tail: .long schedule_tail
  890. .Lsys_call_table: .long sys_call_table
  891. .Lsysc_per: .long sysc_per + 0x80000000
  892. #ifdef CONFIG_TRACE_IRQFLAGS
  893. .Lhardirqs_on: .long trace_hardirqs_on_caller
  894. .Lhardirqs_off: .long trace_hardirqs_off_caller
  895. #endif
  896. #ifdef CONFIG_LOCKDEP
  897. .Llockdep_sys_exit: .long lockdep_sys_exit
  898. #endif
  899. .Lcritical_start: .long __critical_start + 0x80000000
  900. .Lcritical_length: .long __critical_end - __critical_start
  901. .section .rodata, "a"
  902. #define SYSCALL(esa,esame,emu) .long esa
  903. .globl sys_call_table
  904. sys_call_table:
  905. #include "syscalls.S"
  906. #undef SYSCALL