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