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