Commit | Line | Data |
---|---|---|
51533b61 MS |
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 | ||
51533b61 MS |
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> | |
5a077369 | 25 | #include <asm/asm-offsets.h> |
51533b61 MS |
26 | |
27 | #include <asm/arch/hwregs/asm/reg_map_asm.h> | |
28 | #include <asm/arch/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], $r13 ; The thread_info_flags parameter. | |
285 | move.d $r9, $r10 ; do_notify_resume syscall/irq param. | |
286 | moveq 0, $r11 ; oldset param - 0 in this case. | |
287 | move.d $sp, $r12 ; The regs param. | |
288 | jsr do_notify_resume | |
289 | nop | |
290 | ||
291 | ba _Rexit | |
292 | nop | |
293 | ||
294 | ;; We get here as a sidetrack when we've entered a syscall with the | |
295 | ;; trace-bit set. We need to call do_syscall_trace and then continue | |
296 | ;; with the call. | |
297 | ||
298 | _syscall_trace_entry: | |
299 | ;; PT_r10 in the frame contains -ENOSYS as required, at this point. | |
300 | ||
301 | jsr do_syscall_trace | |
302 | nop | |
303 | ||
304 | ;; Now re-enter the syscall code to do the syscall itself. We need to | |
305 | ;; restore R9 here to contain the wanted syscall, and the other | |
306 | ;; parameter-bearing registers. | |
307 | addoq +PT_r9, $sp, $acr | |
308 | move.d [$acr], $r9 | |
309 | addoq +PT_orig_r10, $sp, $acr | |
310 | move.d [$acr], $r10 ; PT_r10 is already -ENOSYS. | |
311 | addoq +PT_r11, $sp, $acr | |
312 | move.d [$acr], $r11 | |
313 | addoq +PT_r12, $sp, $acr | |
314 | move.d [$acr], $r12 | |
315 | addoq +PT_r13, $sp, $acr | |
316 | move.d [$acr], $r13 | |
317 | addoq +PT_mof, $sp, $acr | |
318 | move [$acr], $mof | |
319 | addoq +PT_srp, $sp, $acr | |
320 | move [$acr], $srp | |
321 | ||
322 | ba _syscall_traced | |
323 | nop | |
324 | ||
325 | ;; Resume performs the actual task-switching, by switching stack | |
326 | ;; pointers. Input arguments are: | |
327 | ;; | |
328 | ;; R10 = prev | |
329 | ;; R11 = next | |
330 | ;; R12 = thread offset in task struct. | |
331 | ;; | |
332 | ;; Returns old current in R10. | |
333 | ||
334 | resume: | |
335 | subq 4, $sp | |
336 | move $srp, [$sp] ; Keep old/new PC on the stack. | |
337 | add.d $r12, $r10 ; R10 = current tasks tss. | |
338 | addoq +THREAD_ccs, $r10, $acr | |
339 | move $ccs, [$acr] ; Save IRQ enable state. | |
340 | di | |
341 | ||
342 | addoq +THREAD_usp, $r10, $acr | |
343 | move $usp, [$acr] ; Save user-mode stackpointer. | |
344 | ||
345 | ;; See copy_thread for the reason why register R9 is saved. | |
346 | subq 10*4, $sp | |
347 | movem $r9, [$sp] ; Save non-scratch registers and R9. | |
348 | ||
349 | addoq +THREAD_ksp, $r10, $acr | |
350 | move.d $sp, [$acr] ; Save kernel SP for old task. | |
351 | ||
352 | move.d $sp, $r10 ; Return last running task in R10. | |
353 | and.d -8192, $r10 ; Get thread_info from stackpointer. | |
354 | addoq +TI_task, $r10, $acr | |
355 | move.d [$acr], $r10 ; Get task. | |
356 | add.d $r12, $r11 ; Find the new tasks tss. | |
357 | addoq +THREAD_ksp, $r11, $acr | |
358 | move.d [$acr], $sp ; Switch to new stackframe. | |
359 | movem [$sp+], $r9 ; Restore non-scratch registers and R9. | |
360 | ||
361 | addoq +THREAD_usp, $r11, $acr | |
362 | move [$acr], $usp ; Restore user-mode stackpointer. | |
363 | ||
364 | addoq +THREAD_ccs, $r11, $acr | |
365 | move [$acr], $ccs ; Restore IRQ enable status. | |
366 | move.d [$sp+], $acr | |
367 | jump $acr ; Restore PC. | |
368 | nop | |
369 | ||
370 | nmi_interrupt: | |
371 | ||
372 | ;; If we receive a watchdog interrupt while it is not expected, then set | |
373 | ;; up a canonical frame and dump register contents before dying. | |
374 | ||
375 | ;; This prologue MUST match the one in irq.h and the struct in ptregs.h! | |
376 | subq 12, $sp ; Skip EXS, EDA. | |
377 | move $nrp, [$sp] | |
378 | subq 4, $sp | |
379 | move $srp, [$sp] | |
380 | subq 4, $sp | |
381 | move $ccs, [$sp] | |
382 | subq 4, $sp | |
383 | move $spc, [$sp] | |
384 | subq 4, $sp | |
385 | move $mof, [$sp] | |
386 | subq 4, $sp | |
387 | move $srs, [$sp] | |
388 | subq 4, $sp | |
389 | move.d $acr, [$sp] | |
390 | subq 14*4, $sp ; Make room for R0-R13. | |
391 | movem $r13, [$sp] ; Push R0-R13. | |
392 | subq 4, $sp | |
393 | move.d $r10, [$sp] ; Push orig_r10. | |
394 | move.d REG_ADDR(intr_vect, regi_irq, r_nmi), $r0 | |
395 | move.d [$r0], $r0 | |
396 | btstq REG_BIT(intr_vect, r_nmi, watchdog), $r0 | |
397 | bpl 1f | |
398 | nop | |
399 | jsr handle_watchdog_bite ; In time.c. | |
400 | move.d $sp, $r10 ; Pointer to registers | |
401 | 1: btstq REG_BIT(intr_vect, r_nmi, ext), $r0 | |
402 | bpl 1f | |
403 | nop | |
404 | jsr handle_nmi | |
405 | move.d $sp, $r10 ; Pointer to registers | |
406 | 1: addq 4, $sp ; Skip orig_r10 | |
407 | movem [$sp+], $r13 | |
408 | move.d [$sp+], $acr | |
409 | move [$sp], $srs | |
410 | addq 4, $sp | |
411 | move [$sp+], $mof | |
412 | move [$sp+], $spc | |
413 | move [$sp+], $ccs | |
414 | move [$sp+], $srp | |
415 | move [$sp+], $nrp | |
416 | addq 8, $sp ; Skip EXS, EDA. | |
417 | jump $nrp | |
418 | rfn | |
419 | ||
420 | .comm cause_of_death, 4 ;; Don't declare this anywhere. | |
421 | ||
422 | spurious_interrupt: | |
423 | di | |
424 | jump hard_reset_now | |
425 | nop | |
426 | ||
427 | ;; This handles the case when multiple interrupts arrive at the same | |
428 | ;; time. Jump to the first set interrupt bit in a priotiry fashion. The | |
429 | ;; hardware will call the unserved interrupts after the handler | |
430 | ;; finishes. | |
431 | multiple_interrupt: | |
432 | ;; This prologue MUST match the one in irq.h and the struct in ptregs.h! | |
433 | subq 12, $sp ; Skip EXS, EDA. | |
434 | move $erp, [$sp] | |
435 | subq 4, $sp | |
436 | move $srp, [$sp] | |
437 | subq 4, $sp | |
438 | move $ccs, [$sp] | |
439 | subq 4, $sp | |
440 | move $spc, [$sp] | |
441 | subq 4, $sp | |
442 | move $mof, [$sp] | |
443 | subq 4, $sp | |
444 | move $srs, [$sp] | |
445 | subq 4, $sp | |
446 | move.d $acr, [$sp] | |
447 | subq 14*4, $sp ; Make room for R0-R13. | |
448 | movem $r13, [$sp] ; Push R0-R13. | |
449 | subq 4, $sp | |
450 | move.d $r10, [$sp] ; Push orig_r10. | |
451 | ||
452 | ; Set S-bit when kernel debugging to keep hardware breakpoints active. | |
453 | #ifdef CONFIG_ETRAX_KGDB | |
454 | move $ccs, $r0 | |
455 | or.d (1<<9), $r0 | |
456 | move $r0, $ccs | |
457 | #endif | |
458 | ||
459 | jsr crisv32_do_multiple | |
460 | move.d $sp, $r10 | |
461 | jump ret_from_intr | |
462 | nop | |
463 | ||
464 | do_sigtrap: | |
465 | ;; Sigtraps the process that executed the BREAK instruction. Creates a | |
466 | ;; frame that Rexit expects. | |
467 | subq 4, $sp | |
468 | move $eda, [$sp] | |
469 | subq 4, $sp | |
470 | move $exs, [$sp] | |
471 | subq 4, $sp | |
472 | move $erp, [$sp] | |
473 | subq 4, $sp | |
474 | move $srp, [$sp] | |
475 | subq 4, $sp | |
476 | move $ccs, [$sp] | |
477 | subq 4, $sp | |
478 | move $spc, [$sp] | |
479 | subq 4, $sp | |
480 | move $mof, [$sp] | |
481 | subq 4, $sp | |
482 | move $srs, [$sp] | |
483 | subq 4, $sp | |
484 | move.d $acr, [$sp] | |
485 | di ; Need to disable irq's at this point. | |
486 | subq 14*4, $sp ; Make room for r0-r13. | |
487 | movem $r13, [$sp] ; Push the r0-r13 registers. | |
488 | subq 4, $sp | |
489 | move.d $r10, [$sp] ; Push orig_r10. | |
490 | ||
491 | movs.w -8192, $r9 ; THREAD_SIZE == 8192 | |
492 | and.d $sp, $r9 | |
493 | ||
494 | ;; thread_info as first parameter | |
495 | move.d $r9, $r10 | |
496 | moveq 5, $r11 ; SIGTRAP as second argument. | |
497 | jsr ugdb_trap_user | |
498 | nop | |
499 | jump ret_from_intr ; Use the return routine for interrupts. | |
500 | nop | |
501 | ||
502 | gdb_handle_exception: | |
503 | subq 4, $sp | |
504 | move.d $r0, [$sp] | |
505 | #ifdef CONFIG_ETRAX_KGDB | |
506 | move $ccs, $r0 ; U-flag not affected by previous insns. | |
507 | btstq 16, $r0 ; Test the U-flag. | |
508 | bmi _ugdb_handle_exception ; Go to user mode debugging. | |
509 | nop ; Empty delay-slot (cannot pop R0 here). | |
510 | ba kgdb_handle_exception ; Go to kernel debugging. | |
511 | move.d [$sp+], $r0 ; Restore R0 in delay slot. | |
512 | #endif | |
513 | ||
514 | _ugdb_handle_exception: | |
515 | ba do_sigtrap ; SIGTRAP the offending process. | |
516 | move.d [$sp+], $r0 ; Restore R0 in delay slot. | |
517 | ||
518 | .data | |
519 | ||
520 | .section .rodata,"a" | |
521 | sys_call_table: | |
522 | .long sys_restart_syscall ; 0 - old "setup()" system call, used | |
523 | ; for restarting. | |
524 | .long sys_exit | |
525 | .long sys_fork | |
526 | .long sys_read | |
527 | .long sys_write | |
528 | .long sys_open /* 5 */ | |
529 | .long sys_close | |
530 | .long sys_waitpid | |
531 | .long sys_creat | |
532 | .long sys_link | |
533 | .long sys_unlink /* 10 */ | |
534 | .long sys_execve | |
535 | .long sys_chdir | |
536 | .long sys_time | |
537 | .long sys_mknod | |
538 | .long sys_chmod /* 15 */ | |
539 | .long sys_lchown16 | |
540 | .long sys_ni_syscall /* old break syscall holder */ | |
541 | .long sys_stat | |
542 | .long sys_lseek | |
543 | .long sys_getpid /* 20 */ | |
544 | .long sys_mount | |
545 | .long sys_oldumount | |
546 | .long sys_setuid16 | |
547 | .long sys_getuid16 | |
548 | .long sys_stime /* 25 */ | |
549 | .long sys_ptrace | |
550 | .long sys_alarm | |
551 | .long sys_fstat | |
552 | .long sys_pause | |
553 | .long sys_utime /* 30 */ | |
554 | .long sys_ni_syscall /* old stty syscall holder */ | |
555 | .long sys_ni_syscall /* old gtty syscall holder */ | |
556 | .long sys_access | |
557 | .long sys_nice | |
558 | .long sys_ni_syscall /* 35 old ftime syscall holder */ | |
559 | .long sys_sync | |
560 | .long sys_kill | |
561 | .long sys_rename | |
562 | .long sys_mkdir | |
563 | .long sys_rmdir /* 40 */ | |
564 | .long sys_dup | |
565 | .long sys_pipe | |
566 | .long sys_times | |
567 | .long sys_ni_syscall /* old prof syscall holder */ | |
568 | .long sys_brk /* 45 */ | |
569 | .long sys_setgid16 | |
570 | .long sys_getgid16 | |
571 | .long sys_signal | |
572 | .long sys_geteuid16 | |
573 | .long sys_getegid16 /* 50 */ | |
574 | .long sys_acct | |
575 | .long sys_umount /* recycled never used phys( */ | |
576 | .long sys_ni_syscall /* old lock syscall holder */ | |
577 | .long sys_ioctl | |
578 | .long sys_fcntl /* 55 */ | |
579 | .long sys_ni_syscall /* old mpx syscall holder */ | |
580 | .long sys_setpgid | |
581 | .long sys_ni_syscall /* old ulimit syscall holder */ | |
582 | .long sys_ni_syscall /* old sys_olduname holder */ | |
583 | .long sys_umask /* 60 */ | |
584 | .long sys_chroot | |
585 | .long sys_ustat | |
586 | .long sys_dup2 | |
587 | .long sys_getppid | |
588 | .long sys_getpgrp /* 65 */ | |
589 | .long sys_setsid | |
590 | .long sys_sigaction | |
591 | .long sys_sgetmask | |
592 | .long sys_ssetmask | |
593 | .long sys_setreuid16 /* 70 */ | |
594 | .long sys_setregid16 | |
595 | .long sys_sigsuspend | |
596 | .long sys_sigpending | |
597 | .long sys_sethostname | |
598 | .long sys_setrlimit /* 75 */ | |
599 | .long sys_old_getrlimit | |
600 | .long sys_getrusage | |
601 | .long sys_gettimeofday | |
602 | .long sys_settimeofday | |
603 | .long sys_getgroups16 /* 80 */ | |
604 | .long sys_setgroups16 | |
605 | .long sys_select /* was old_select in Linux/E100 */ | |
606 | .long sys_symlink | |
607 | .long sys_lstat | |
608 | .long sys_readlink /* 85 */ | |
609 | .long sys_uselib | |
610 | .long sys_swapon | |
611 | .long sys_reboot | |
612 | .long old_readdir | |
613 | .long old_mmap /* 90 */ | |
614 | .long sys_munmap | |
615 | .long sys_truncate | |
616 | .long sys_ftruncate | |
617 | .long sys_fchmod | |
618 | .long sys_fchown16 /* 95 */ | |
619 | .long sys_getpriority | |
620 | .long sys_setpriority | |
621 | .long sys_ni_syscall /* old profil syscall holder */ | |
622 | .long sys_statfs | |
623 | .long sys_fstatfs /* 100 */ | |
624 | .long sys_ni_syscall /* sys_ioperm in i386 */ | |
625 | .long sys_socketcall | |
626 | .long sys_syslog | |
627 | .long sys_setitimer | |
628 | .long sys_getitimer /* 105 */ | |
629 | .long sys_newstat | |
630 | .long sys_newlstat | |
631 | .long sys_newfstat | |
632 | .long sys_ni_syscall /* old sys_uname holder */ | |
633 | .long sys_ni_syscall /* sys_iopl in i386 */ | |
634 | .long sys_vhangup | |
635 | .long sys_ni_syscall /* old "idle" system call */ | |
636 | .long sys_ni_syscall /* vm86old in i386 */ | |
637 | .long sys_wait4 | |
638 | .long sys_swapoff /* 115 */ | |
639 | .long sys_sysinfo | |
640 | .long sys_ipc | |
641 | .long sys_fsync | |
642 | .long sys_sigreturn | |
643 | .long sys_clone /* 120 */ | |
644 | .long sys_setdomainname | |
645 | .long sys_newuname | |
646 | .long sys_ni_syscall /* sys_modify_ldt */ | |
647 | .long sys_adjtimex | |
648 | .long sys_mprotect /* 125 */ | |
649 | .long sys_sigprocmask | |
650 | .long sys_ni_syscall /* old "create_module" */ | |
651 | .long sys_init_module | |
652 | .long sys_delete_module | |
653 | .long sys_ni_syscall /* 130: old "get_kernel_syms" */ | |
654 | .long sys_quotactl | |
655 | .long sys_getpgid | |
656 | .long sys_fchdir | |
657 | .long sys_bdflush | |
658 | .long sys_sysfs /* 135 */ | |
659 | .long sys_personality | |
660 | .long sys_ni_syscall /* for afs_syscall */ | |
661 | .long sys_setfsuid16 | |
662 | .long sys_setfsgid16 | |
663 | .long sys_llseek /* 140 */ | |
664 | .long sys_getdents | |
665 | .long sys_select | |
666 | .long sys_flock | |
667 | .long sys_msync | |
668 | .long sys_readv /* 145 */ | |
669 | .long sys_writev | |
670 | .long sys_getsid | |
671 | .long sys_fdatasync | |
672 | .long sys_sysctl | |
673 | .long sys_mlock /* 150 */ | |
674 | .long sys_munlock | |
675 | .long sys_mlockall | |
676 | .long sys_munlockall | |
677 | .long sys_sched_setparam | |
678 | .long sys_sched_getparam /* 155 */ | |
679 | .long sys_sched_setscheduler | |
680 | .long sys_sched_getscheduler | |
681 | .long sys_sched_yield | |
682 | .long sys_sched_get_priority_max | |
683 | .long sys_sched_get_priority_min /* 160 */ | |
684 | .long sys_sched_rr_get_interval | |
685 | .long sys_nanosleep | |
686 | .long sys_mremap | |
687 | .long sys_setresuid16 | |
688 | .long sys_getresuid16 /* 165 */ | |
689 | .long sys_ni_syscall /* sys_vm86 */ | |
690 | .long sys_ni_syscall /* Old sys_query_module */ | |
691 | .long sys_poll | |
692 | .long sys_nfsservctl | |
693 | .long sys_setresgid16 /* 170 */ | |
694 | .long sys_getresgid16 | |
695 | .long sys_prctl | |
696 | .long sys_rt_sigreturn | |
697 | .long sys_rt_sigaction | |
698 | .long sys_rt_sigprocmask /* 175 */ | |
699 | .long sys_rt_sigpending | |
700 | .long sys_rt_sigtimedwait | |
701 | .long sys_rt_sigqueueinfo | |
702 | .long sys_rt_sigsuspend | |
703 | .long sys_pread64 /* 180 */ | |
704 | .long sys_pwrite64 | |
705 | .long sys_chown16 | |
706 | .long sys_getcwd | |
707 | .long sys_capget | |
708 | .long sys_capset /* 185 */ | |
709 | .long sys_sigaltstack | |
710 | .long sys_sendfile | |
711 | .long sys_ni_syscall /* streams1 */ | |
712 | .long sys_ni_syscall /* streams2 */ | |
713 | .long sys_vfork /* 190 */ | |
714 | .long sys_getrlimit | |
715 | .long sys_mmap2 | |
716 | .long sys_truncate64 | |
717 | .long sys_ftruncate64 | |
718 | .long sys_stat64 /* 195 */ | |
719 | .long sys_lstat64 | |
720 | .long sys_fstat64 | |
721 | .long sys_lchown | |
722 | .long sys_getuid | |
723 | .long sys_getgid /* 200 */ | |
724 | .long sys_geteuid | |
725 | .long sys_getegid | |
726 | .long sys_setreuid | |
727 | .long sys_setregid | |
728 | .long sys_getgroups /* 205 */ | |
729 | .long sys_setgroups | |
730 | .long sys_fchown | |
731 | .long sys_setresuid | |
732 | .long sys_getresuid | |
733 | .long sys_setresgid /* 210 */ | |
734 | .long sys_getresgid | |
735 | .long sys_chown | |
736 | .long sys_setuid | |
737 | .long sys_setgid | |
738 | .long sys_setfsuid /* 215 */ | |
739 | .long sys_setfsgid | |
740 | .long sys_pivot_root | |
741 | .long sys_mincore | |
742 | .long sys_madvise | |
743 | .long sys_getdents64 /* 220 */ | |
744 | .long sys_fcntl64 | |
745 | .long sys_ni_syscall /* reserved for TUX */ | |
746 | .long sys_ni_syscall | |
747 | .long sys_gettid | |
748 | .long sys_readahead /* 225 */ | |
749 | .long sys_setxattr | |
750 | .long sys_lsetxattr | |
751 | .long sys_fsetxattr | |
752 | .long sys_getxattr | |
753 | .long sys_lgetxattr /* 230 */ | |
754 | .long sys_fgetxattr | |
755 | .long sys_listxattr | |
756 | .long sys_llistxattr | |
757 | .long sys_flistxattr | |
758 | .long sys_removexattr /* 235 */ | |
759 | .long sys_lremovexattr | |
760 | .long sys_fremovexattr | |
761 | .long sys_tkill | |
762 | .long sys_sendfile64 | |
763 | .long sys_futex /* 240 */ | |
764 | .long sys_sched_setaffinity | |
765 | .long sys_sched_getaffinity | |
766 | .long sys_ni_syscall /* sys_set_thread_area */ | |
767 | .long sys_ni_syscall /* sys_get_thread_area */ | |
768 | .long sys_io_setup /* 245 */ | |
769 | .long sys_io_destroy | |
770 | .long sys_io_getevents | |
771 | .long sys_io_submit | |
772 | .long sys_io_cancel | |
773 | .long sys_fadvise64 /* 250 */ | |
774 | .long sys_ni_syscall | |
775 | .long sys_exit_group | |
776 | .long sys_lookup_dcookie | |
777 | .long sys_epoll_create | |
778 | .long sys_epoll_ctl /* 255 */ | |
779 | .long sys_epoll_wait | |
780 | .long sys_remap_file_pages | |
781 | .long sys_set_tid_address | |
782 | .long sys_timer_create | |
783 | .long sys_timer_settime /* 260 */ | |
784 | .long sys_timer_gettime | |
785 | .long sys_timer_getoverrun | |
786 | .long sys_timer_delete | |
787 | .long sys_clock_settime | |
788 | .long sys_clock_gettime /* 265 */ | |
789 | .long sys_clock_getres | |
790 | .long sys_clock_nanosleep | |
791 | .long sys_statfs64 | |
792 | .long sys_fstatfs64 | |
793 | .long sys_tgkill /* 270 */ | |
794 | .long sys_utimes | |
795 | .long sys_fadvise64_64 | |
796 | .long sys_ni_syscall /* sys_vserver */ | |
797 | .long sys_ni_syscall /* sys_mbind */ | |
798 | .long sys_ni_syscall /* 275 sys_get_mempolicy */ | |
799 | .long sys_ni_syscall /* sys_set_mempolicy */ | |
800 | .long sys_mq_open | |
801 | .long sys_mq_unlink | |
802 | .long sys_mq_timedsend | |
803 | .long sys_mq_timedreceive /* 280 */ | |
804 | .long sys_mq_notify | |
805 | .long sys_mq_getsetattr | |
806 | .long sys_ni_syscall /* reserved for kexec */ | |
807 | .long sys_waitid | |
808 | ||
809 | /* | |
810 | * NOTE!! This doesn't have to be exact - we just have | |
811 | * to make sure we have _enough_ of the "sys_ni_syscall" | |
812 | * entries. Don't panic if you notice that this hasn't | |
813 | * been shrunk every time we add a new system call. | |
814 | */ | |
815 | ||
816 | .rept NR_syscalls - (.-sys_call_table) / 4 | |
817 | .long sys_ni_syscall | |
818 | .endr | |
819 |