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