Merge branches 'no-rebases', 'arch-avr32', 'arch-blackfin', 'arch-cris', 'arch-h8300...
[cascardo/linux.git] / arch / mn10300 / kernel / entry.S
1 ###############################################################################
2 #
3 # MN10300 Exception and interrupt entry points
4 #
5 # Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
6 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
7 # Modified by David Howells (dhowells@redhat.com)
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public Licence
11 # as published by the Free Software Foundation; either version
12 # 2 of the Licence, or (at your option) any later version.
13 #
14 ###############################################################################
15 #include <linux/sys.h>
16 #include <linux/linkage.h>
17 #include <asm/smp.h>
18 #include <asm/irqflags.h>
19 #include <asm/thread_info.h>
20 #include <asm/intctl-regs.h>
21 #include <asm/busctl-regs.h>
22 #include <asm/timer-regs.h>
23 #include <unit/leds.h>
24 #include <asm/page.h>
25 #include <asm/pgtable.h>
26 #include <asm/errno.h>
27 #include <asm/asm-offsets.h>
28 #include <asm/frame.inc>
29
30 #if defined(CONFIG_SMP) && defined(CONFIG_GDBSTUB)
31 #include <asm/gdb-stub.h>
32 #endif /* CONFIG_SMP && CONFIG_GDBSTUB */
33
34 #ifdef CONFIG_PREEMPT
35 #define preempt_stop            LOCAL_IRQ_DISABLE
36 #else
37 #define preempt_stop
38 #define resume_kernel           restore_all
39 #endif
40
41         .am33_2
42
43 ###############################################################################
44 #
45 # the return path for a forked child
46 # - on entry, D0 holds the address of the previous task to run
47 #
48 ###############################################################################
49 ENTRY(ret_from_fork)
50         call    schedule_tail[],0
51         GET_THREAD_INFO a2
52
53         # return 0 to indicate child process
54         clr     d0
55         mov     d0,(REG_D0,fp)
56         jmp     syscall_exit
57
58 ENTRY(ret_from_kernel_thread)
59         call    schedule_tail[],0
60         mov     (REG_D0,fp),d0
61         mov     (REG_A0,fp),a0
62         calls   (a0)
63         clr     d0
64         mov     d0,(REG_D0,fp)
65         jmp     syscall_exit
66
67 ###############################################################################
68 #
69 # system call handler
70 #
71 ###############################################################################
72 ENTRY(system_call)
73         add     -4,sp
74         SAVE_ALL
75         mov     d0,(REG_ORIG_D0,fp)
76         GET_THREAD_INFO a2
77         cmp     nr_syscalls,d0
78         bcc     syscall_badsys
79         btst    _TIF_SYSCALL_TRACE,(TI_flags,a2)
80         bne     syscall_entry_trace
81 syscall_call:
82         add     d0,d0,a1
83         add     a1,a1
84         mov     (REG_A0,fp),d0
85         mov     (sys_call_table,a1),a0
86         calls   (a0)
87         mov     d0,(REG_D0,fp)
88 syscall_exit:
89         # make sure we don't miss an interrupt setting need_resched or
90         # sigpending between sampling and the rti
91         LOCAL_IRQ_DISABLE
92         mov     (TI_flags,a2),d2
93         btst    _TIF_ALLWORK_MASK,d2
94         bne     syscall_exit_work
95 restore_all:
96         RESTORE_ALL
97
98 ###############################################################################
99 #
100 # perform work that needs to be done immediately before resumption and syscall
101 # tracing
102 #
103 ###############################################################################
104         ALIGN
105 syscall_exit_work:
106         mov     (REG_EPSW,fp),d0
107         and     EPSW_nSL,d0
108         beq     resume_kernel           # returning to supervisor mode
109
110         btst    _TIF_SYSCALL_TRACE,d2
111         beq     work_pending
112         LOCAL_IRQ_ENABLE                # could let syscall_trace_exit() call
113                                         # schedule() instead
114         mov     fp,d0
115         call    syscall_trace_exit[],0  # do_syscall_trace(regs)
116         jmp     resume_userspace
117
118         ALIGN
119 work_pending:
120         btst    _TIF_NEED_RESCHED,d2
121         beq     work_notifysig
122
123 work_resched:
124         call    schedule[],0
125
126         # make sure we don't miss an interrupt setting need_resched or
127         # sigpending between sampling and the rti
128         LOCAL_IRQ_DISABLE
129
130         # is there any work to be done other than syscall tracing?
131         mov     (TI_flags,a2),d2
132         btst    _TIF_WORK_MASK,d2
133         beq     restore_all
134         btst    _TIF_NEED_RESCHED,d2
135         bne     work_resched
136
137         # deal with pending signals and notify-resume requests
138 work_notifysig:
139         mov     fp,d0
140         mov     d2,d1
141         call    do_notify_resume[],0
142         jmp     resume_userspace
143
144         # perform syscall entry tracing
145 syscall_entry_trace:
146         mov     -ENOSYS,d0
147         mov     d0,(REG_D0,fp)
148         mov     fp,d0
149         call    syscall_trace_entry[],0 # returns the syscall number to actually use
150         mov     (REG_D1,fp),d1
151         cmp     nr_syscalls,d0
152         bcs     syscall_call
153         jmp     syscall_exit
154
155 syscall_badsys:
156         mov     -ENOSYS,d0
157         mov     d0,(REG_D0,fp)
158         jmp     resume_userspace
159
160         # userspace resumption stub bypassing syscall exit tracing
161         .globl  ret_from_exception, ret_from_intr
162         ALIGN
163 ret_from_exception:
164         preempt_stop
165 ret_from_intr:
166         GET_THREAD_INFO a2
167         mov     (REG_EPSW,fp),d0        # need to deliver signals before
168                                         # returning to userspace
169         and     EPSW_nSL,d0
170         beq     resume_kernel           # returning to supervisor mode
171
172 ENTRY(resume_userspace)
173         # make sure we don't miss an interrupt setting need_resched or
174         # sigpending between sampling and the rti
175         LOCAL_IRQ_DISABLE
176
177         # is there any work to be done on int/exception return?
178         mov     (TI_flags,a2),d2
179         btst    _TIF_WORK_MASK,d2
180         bne     work_pending
181         jmp     restore_all
182
183 #ifdef CONFIG_PREEMPT
184 ENTRY(resume_kernel)
185         LOCAL_IRQ_DISABLE
186         mov     (TI_preempt_count,a2),d0        # non-zero preempt_count ?
187         cmp     0,d0
188         bne     restore_all
189
190 need_resched:
191         btst    _TIF_NEED_RESCHED,(TI_flags,a2)
192         beq     restore_all
193         mov     (REG_EPSW,fp),d0
194         and     EPSW_IM,d0
195         cmp     EPSW_IM_7,d0            # interrupts off (exception path) ?
196         bne     restore_all
197         call    preempt_schedule_irq[],0
198         jmp     need_resched
199 #endif
200
201
202 ###############################################################################
203 #
204 # IRQ handler entry point
205 # - intended to be entered at multiple priorities
206 #
207 ###############################################################################
208 ENTRY(irq_handler)
209         add     -4,sp
210         SAVE_ALL
211
212         # it's not a syscall
213         mov     0xffffffff,d0
214         mov     d0,(REG_ORIG_D0,fp)
215
216         mov     fp,d0
217         call    do_IRQ[],0                      # do_IRQ(regs)
218
219         jmp     ret_from_intr
220
221 ###############################################################################
222 #
223 # Double Fault handler entry point
224 # - note that there will not be a stack, D0/A0 will hold EPSW/PC as were
225 #
226 ###############################################################################
227         .section .bss
228         .balign THREAD_SIZE
229         .space  THREAD_SIZE
230 __df_stack:
231         .previous
232
233 ENTRY(double_fault)
234         mov     a0,(__df_stack-4)       # PC as was
235         mov     d0,(__df_stack-8)       # EPSW as was
236         mn10300_set_dbfleds             # display 'db-f' on the LEDs
237         mov     0xaa55aa55,d0
238         mov     d0,(__df_stack-12)      # no ORIG_D0
239         mov     sp,a0                   # save corrupted SP
240         mov     __df_stack-12,sp        # emergency supervisor stack
241         SAVE_ALL
242         mov     a0,(REG_A0,fp)          # save corrupted SP as A0 (which got
243                                         # clobbered by the CPU)
244         mov     fp,d0
245         calls   do_double_fault
246 double_fault_loop:
247         bra     double_fault_loop
248
249 ###############################################################################
250 #
251 # Bus Error handler entry point
252 # - handle external (async) bus errors separately
253 #
254 ###############################################################################
255 ENTRY(raw_bus_error)
256         add     -4,sp
257         mov     d0,(sp)
258 #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
259         mov     (MMUCTR),d0
260         mov     d0,(MMUCTR)
261 #endif
262         mov     (BCBERR),d0             # what
263         btst    BCBERR_BEMR_DMA,d0      # see if it was an external bus error
264         beq     __common_exception_aux  # it wasn't
265
266         SAVE_ALL
267         mov     (BCBEAR),d1             # destination of erroneous access
268
269         mov     (REG_ORIG_D0,fp),d2
270         mov     d2,(REG_D0,fp)
271         mov     -1,d2
272         mov     d2,(REG_ORIG_D0,fp)
273
274         add     -4,sp
275         mov     fp,(12,sp)              # frame pointer
276         call    io_bus_error[],0
277         jmp     restore_all
278
279 ###############################################################################
280 #
281 # NMI exception entry points
282 #
283 # This is used by ordinary interrupt channels that have the GxICR_NMI bit set
284 # in addition to the main NMI and Watchdog channels.  SMP NMI IPIs use this
285 # facility.
286 #
287 ###############################################################################
288 ENTRY(nmi_handler)
289         add     -4,sp
290         mov     d0,(sp)
291         mov     (TBR),d0
292
293 #ifdef CONFIG_SMP
294         add     -4,sp
295         mov     d0,(sp)                 # save d0(TBR)
296         movhu   (NMIAGR),d0
297         and     NMIAGR_GN,d0
298         lsr     0x2,d0
299         cmp     CALL_FUNCTION_NMI_IPI,d0
300         bne     nmi_not_smp_callfunc    # if not call function, jump
301
302         # function call nmi ipi
303         add     4,sp                    # no need to store TBR
304         mov     GxICR_DETECT,d0         # clear NMI request
305         movbu   d0,(GxICR(CALL_FUNCTION_NMI_IPI))
306         movhu   (GxICR(CALL_FUNCTION_NMI_IPI)),d0
307         and     ~EPSW_NMID,epsw         # enable NMI
308
309         mov     (sp),d0                 # restore d0
310         SAVE_ALL
311         call    smp_nmi_call_function_interrupt[],0
312         RESTORE_ALL
313
314 nmi_not_smp_callfunc:
315 #ifdef CONFIG_KERNEL_DEBUGGER
316         cmp     DEBUGGER_NMI_IPI,d0
317         bne     nmi_not_debugger        # if not kernel debugger NMI IPI, jump
318
319         # kernel debugger NMI IPI
320         add     4,sp                    # no need to store TBR
321         mov     GxICR_DETECT,d0         # clear NMI
322         movbu   d0,(GxICR(DEBUGGER_NMI_IPI))
323         movhu   (GxICR(DEBUGGER_NMI_IPI)),d0
324         and     ~EPSW_NMID,epsw         # enable NMI
325
326         mov     (sp),d0
327         SAVE_ALL
328         mov     fp,d0                   # arg 0: stacked register file
329         mov     a2,d1                   # arg 1: exception number
330         call    debugger_nmi_interrupt[],0
331         RESTORE_ALL
332
333 nmi_not_debugger:
334 #endif /* CONFIG_KERNEL_DEBUGGER */
335         mov     (sp),d0                 # restore TBR to d0
336         add     4,sp
337 #endif /* CONFIG_SMP */
338
339         bra     __common_exception_nonmi
340
341 ###############################################################################
342 #
343 # General exception entry point
344 #
345 ###############################################################################
346 ENTRY(__common_exception)
347         add     -4,sp
348         mov     d0,(sp)
349 #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
350         mov     (MMUCTR),d0
351         mov     d0,(MMUCTR)
352 #endif
353
354 __common_exception_aux:
355         mov     (TBR),d0
356         and     ~EPSW_NMID,epsw         # turn NMIs back on if not NMI
357         or      EPSW_IE,epsw
358
359 __common_exception_nonmi:
360         and     0x0000FFFF,d0           # turn the exception code into a vector
361                                         # table index
362
363         btst    0x00000007,d0
364         bne     1f
365         cmp     0x00000400,d0
366         bge     1f
367
368         SAVE_ALL                        # build the stack frame
369
370         mov     (REG_D0,fp),a2          # get the exception number
371         mov     (REG_ORIG_D0,fp),d0
372         mov     d0,(REG_D0,fp)
373         mov     -1,d0
374         mov     d0,(REG_ORIG_D0,fp)
375
376 #ifdef CONFIG_GDBSTUB
377 #ifdef CONFIG_SMP
378         call    gdbstub_busy_check[],0
379         and     d0,d0                   # check return value
380         beq     2f
381 #else  /* CONFIG_SMP */
382         btst    0x01,(gdbstub_busy)
383         beq     2f
384 #endif /* CONFIG_SMP */
385         and     ~EPSW_IE,epsw
386         mov     fp,d0
387         mov     a2,d1
388         call    gdbstub_exception[],0   # gdbstub itself caused an exception
389         bra     restore_all
390 2:
391 #endif /* CONFIG_GDBSTUB */
392
393         mov     fp,d0                   # arg 0: stacked register file
394         mov     a2,d1                   # arg 1: exception number
395         lsr     1,a2
396
397         mov     (exception_table,a2),a2
398         calls   (a2)
399         jmp     ret_from_exception
400
401 1:      pi                              # BUG() equivalent
402
403 ###############################################################################
404 #
405 # Exception handler functions table
406 #
407 ###############################################################################
408         .data
409 ENTRY(exception_table)
410         .rept   0x400>>1
411          .long  uninitialised_exception
412         .endr
413         .previous
414
415 ###############################################################################
416 #
417 # Change an entry in the exception table
418 # - D0 exception code, D1 handler
419 #
420 ###############################################################################
421 ENTRY(set_excp_vector)
422         lsr     1,d0
423         add     exception_table,d0
424         mov     d1,(d0)
425         mov     4,d1
426         ret     [],0
427
428 ###############################################################################
429 #
430 # System call table
431 #
432 ###############################################################################
433         .data
434 ENTRY(sys_call_table)
435         .long sys_restart_syscall       /* 0 */
436         .long sys_exit
437         .long sys_fork
438         .long sys_read
439         .long sys_write
440         .long sys_open          /* 5 */
441         .long sys_close
442         .long sys_waitpid
443         .long sys_creat
444         .long sys_link
445         .long sys_unlink        /* 10 */
446         .long sys_execve
447         .long sys_chdir
448         .long sys_time
449         .long sys_mknod
450         .long sys_chmod         /* 15 */
451         .long sys_lchown16
452         .long sys_ni_syscall    /* old break syscall holder */
453         .long sys_stat
454         .long sys_lseek
455         .long sys_getpid        /* 20 */
456         .long sys_mount
457         .long sys_oldumount
458         .long sys_setuid16
459         .long sys_getuid16
460         .long sys_stime         /* 25 */
461         .long sys_ptrace
462         .long sys_alarm
463         .long sys_fstat
464         .long sys_pause
465         .long sys_utime         /* 30 */
466         .long sys_ni_syscall    /* old stty syscall holder */
467         .long sys_ni_syscall    /* old gtty syscall holder */
468         .long sys_access
469         .long sys_nice
470         .long sys_ni_syscall    /* 35 - old ftime syscall holder */
471         .long sys_sync
472         .long sys_kill
473         .long sys_rename
474         .long sys_mkdir
475         .long sys_rmdir         /* 40 */
476         .long sys_dup
477         .long sys_pipe
478         .long sys_times
479         .long sys_ni_syscall    /* old prof syscall holder */
480         .long sys_brk           /* 45 */
481         .long sys_setgid16
482         .long sys_getgid16
483         .long sys_signal
484         .long sys_geteuid16
485         .long sys_getegid16     /* 50 */
486         .long sys_acct
487         .long sys_umount        /* recycled never used phys() */
488         .long sys_ni_syscall    /* old lock syscall holder */
489         .long sys_ioctl
490         .long sys_fcntl         /* 55 */
491         .long sys_ni_syscall    /* old mpx syscall holder */
492         .long sys_setpgid
493         .long sys_ni_syscall    /* old ulimit syscall holder */
494         .long sys_ni_syscall    /* old sys_olduname */
495         .long sys_umask         /* 60 */
496         .long sys_chroot
497         .long sys_ustat
498         .long sys_dup2
499         .long sys_getppid
500         .long sys_getpgrp       /* 65 */
501         .long sys_setsid
502         .long sys_sigaction
503         .long sys_sgetmask
504         .long sys_ssetmask
505         .long sys_setreuid16    /* 70 */
506         .long sys_setregid16
507         .long sys_sigsuspend
508         .long sys_sigpending
509         .long sys_sethostname
510         .long sys_setrlimit     /* 75 */
511         .long sys_old_getrlimit
512         .long sys_getrusage
513         .long sys_gettimeofday
514         .long sys_settimeofday
515         .long sys_getgroups16   /* 80 */
516         .long sys_setgroups16
517         .long sys_old_select
518         .long sys_symlink
519         .long sys_lstat
520         .long sys_readlink      /* 85 */
521         .long sys_uselib
522         .long sys_swapon
523         .long sys_reboot
524         .long sys_old_readdir
525         .long old_mmap          /* 90 */
526         .long sys_munmap
527         .long sys_truncate
528         .long sys_ftruncate
529         .long sys_fchmod
530         .long sys_fchown16      /* 95 */
531         .long sys_getpriority
532         .long sys_setpriority
533         .long sys_ni_syscall    /* old profil syscall holder */
534         .long sys_statfs
535         .long sys_fstatfs       /* 100 */
536         .long sys_ni_syscall    /* ioperm */
537         .long sys_socketcall
538         .long sys_syslog
539         .long sys_setitimer
540         .long sys_getitimer     /* 105 */
541         .long sys_newstat
542         .long sys_newlstat
543         .long sys_newfstat
544         .long sys_ni_syscall    /* old sys_uname */
545         .long sys_ni_syscall    /* 110 - iopl */
546         .long sys_vhangup
547         .long sys_ni_syscall    /* old "idle" system call */
548         .long sys_ni_syscall    /* vm86old */
549         .long sys_wait4
550         .long sys_swapoff       /* 115 */
551         .long sys_sysinfo
552         .long sys_ipc
553         .long sys_fsync
554         .long sys_sigreturn
555         .long sys_clone         /* 120 */
556         .long sys_setdomainname
557         .long sys_newuname
558         .long sys_ni_syscall    /* modify_ldt */
559         .long sys_adjtimex
560         .long sys_mprotect      /* 125 */
561         .long sys_sigprocmask
562         .long sys_ni_syscall    /* old "create_module" */
563         .long sys_init_module
564         .long sys_delete_module
565         .long sys_ni_syscall    /* 130: old "get_kernel_syms" */
566         .long sys_quotactl
567         .long sys_getpgid
568         .long sys_fchdir
569         .long sys_bdflush
570         .long sys_sysfs         /* 135 */
571         .long sys_personality
572         .long sys_ni_syscall    /* reserved for afs_syscall */
573         .long sys_setfsuid16
574         .long sys_setfsgid16
575         .long sys_llseek        /* 140 */
576         .long sys_getdents
577         .long sys_select
578         .long sys_flock
579         .long sys_msync
580         .long sys_readv         /* 145 */
581         .long sys_writev
582         .long sys_getsid
583         .long sys_fdatasync
584         .long sys_sysctl
585         .long sys_mlock         /* 150 */
586         .long sys_munlock
587         .long sys_mlockall
588         .long sys_munlockall
589         .long sys_sched_setparam
590         .long sys_sched_getparam   /* 155 */
591         .long sys_sched_setscheduler
592         .long sys_sched_getscheduler
593         .long sys_sched_yield
594         .long sys_sched_get_priority_max
595         .long sys_sched_get_priority_min  /* 160 */
596         .long sys_sched_rr_get_interval
597         .long sys_nanosleep
598         .long sys_mremap
599         .long sys_setresuid16
600         .long sys_getresuid16   /* 165 */
601         .long sys_ni_syscall    /* vm86 */
602         .long sys_ni_syscall    /* Old sys_query_module */
603         .long sys_poll
604         .long sys_ni_syscall    /* was nfsservctl */
605         .long sys_setresgid16   /* 170 */
606         .long sys_getresgid16
607         .long sys_prctl
608         .long sys_rt_sigreturn
609         .long sys_rt_sigaction
610         .long sys_rt_sigprocmask        /* 175 */
611         .long sys_rt_sigpending
612         .long sys_rt_sigtimedwait
613         .long sys_rt_sigqueueinfo
614         .long sys_rt_sigsuspend
615         .long sys_pread64       /* 180 */
616         .long sys_pwrite64
617         .long sys_chown16
618         .long sys_getcwd
619         .long sys_capget
620         .long sys_capset        /* 185 */
621         .long sys_sigaltstack
622         .long sys_sendfile
623         .long sys_ni_syscall    /* reserved for streams1 */
624         .long sys_ni_syscall    /* reserved for streams2 */
625         .long sys_vfork         /* 190 */
626         .long sys_getrlimit
627         .long sys_mmap_pgoff
628         .long sys_truncate64
629         .long sys_ftruncate64
630         .long sys_stat64        /* 195 */
631         .long sys_lstat64
632         .long sys_fstat64
633         .long sys_lchown
634         .long sys_getuid
635         .long sys_getgid        /* 200 */
636         .long sys_geteuid
637         .long sys_getegid
638         .long sys_setreuid
639         .long sys_setregid
640         .long sys_getgroups     /* 205 */
641         .long sys_setgroups
642         .long sys_fchown
643         .long sys_setresuid
644         .long sys_getresuid
645         .long sys_setresgid     /* 210 */
646         .long sys_getresgid
647         .long sys_chown
648         .long sys_setuid
649         .long sys_setgid
650         .long sys_setfsuid      /* 215 */
651         .long sys_setfsgid
652         .long sys_pivot_root
653         .long sys_mincore
654         .long sys_madvise
655         .long sys_getdents64    /* 220 */
656         .long sys_fcntl64
657         .long sys_ni_syscall    /* reserved for TUX */
658         .long sys_ni_syscall
659         .long sys_gettid
660         .long sys_readahead     /* 225 */
661         .long sys_setxattr
662         .long sys_lsetxattr
663         .long sys_fsetxattr
664         .long sys_getxattr
665         .long sys_lgetxattr     /* 230 */
666         .long sys_fgetxattr
667         .long sys_listxattr
668         .long sys_llistxattr
669         .long sys_flistxattr
670         .long sys_removexattr   /* 235 */
671         .long sys_lremovexattr
672         .long sys_fremovexattr
673         .long sys_tkill
674         .long sys_sendfile64
675         .long sys_futex         /* 240 */
676         .long sys_sched_setaffinity
677         .long sys_sched_getaffinity
678         .long sys_ni_syscall    /* sys_set_thread_area */
679         .long sys_ni_syscall    /* sys_get_thread_area */
680         .long sys_io_setup      /* 245 */
681         .long sys_io_destroy
682         .long sys_io_getevents
683         .long sys_io_submit
684         .long sys_io_cancel
685         .long sys_fadvise64     /* 250 */
686         .long sys_ni_syscall
687         .long sys_exit_group
688         .long sys_lookup_dcookie
689         .long sys_epoll_create
690         .long sys_epoll_ctl     /* 255 */
691         .long sys_epoll_wait
692         .long sys_remap_file_pages
693         .long sys_set_tid_address
694         .long sys_timer_create
695         .long sys_timer_settime         /* 260 */
696         .long sys_timer_gettime
697         .long sys_timer_getoverrun
698         .long sys_timer_delete
699         .long sys_clock_settime
700         .long sys_clock_gettime         /* 265 */
701         .long sys_clock_getres
702         .long sys_clock_nanosleep
703         .long sys_statfs64
704         .long sys_fstatfs64
705         .long sys_tgkill                /* 270 */
706         .long sys_utimes
707         .long sys_fadvise64_64
708         .long sys_ni_syscall    /* sys_vserver */
709         .long sys_mbind
710         .long sys_get_mempolicy         /* 275 */
711         .long sys_set_mempolicy
712         .long sys_mq_open
713         .long sys_mq_unlink
714         .long sys_mq_timedsend
715         .long sys_mq_timedreceive       /* 280 */
716         .long sys_mq_notify
717         .long sys_mq_getsetattr
718         .long sys_kexec_load
719         .long sys_waitid
720         .long sys_ni_syscall            /* 285 */ /* available */
721         .long sys_add_key
722         .long sys_request_key
723         .long sys_keyctl
724         .long sys_cacheflush
725         .long sys_ioprio_set            /* 290 */
726         .long sys_ioprio_get
727         .long sys_inotify_init
728         .long sys_inotify_add_watch
729         .long sys_inotify_rm_watch
730         .long sys_migrate_pages         /* 295 */
731         .long sys_openat
732         .long sys_mkdirat
733         .long sys_mknodat
734         .long sys_fchownat
735         .long sys_futimesat             /* 300 */
736         .long sys_fstatat64
737         .long sys_unlinkat
738         .long sys_renameat
739         .long sys_linkat
740         .long sys_symlinkat             /* 305 */
741         .long sys_readlinkat
742         .long sys_fchmodat
743         .long sys_faccessat
744         .long sys_pselect6
745         .long sys_ppoll                 /* 310 */
746         .long sys_unshare
747         .long sys_set_robust_list
748         .long sys_get_robust_list
749         .long sys_splice
750         .long sys_sync_file_range       /* 315 */
751         .long sys_tee
752         .long sys_vmsplice
753         .long sys_move_pages
754         .long sys_getcpu
755         .long sys_epoll_pwait           /* 320 */
756         .long sys_utimensat
757         .long sys_signalfd
758         .long sys_timerfd_create
759         .long sys_eventfd
760         .long sys_fallocate             /* 325 */
761         .long sys_timerfd_settime
762         .long sys_timerfd_gettime
763         .long sys_signalfd4
764         .long sys_eventfd2
765         .long sys_epoll_create1         /* 330 */
766         .long sys_dup3
767         .long sys_pipe2
768         .long sys_inotify_init1
769         .long sys_preadv
770         .long sys_pwritev               /* 335 */
771         .long sys_rt_tgsigqueueinfo
772         .long sys_perf_event_open
773         .long sys_recvmmsg
774         .long sys_setns
775
776
777 nr_syscalls=(.-sys_call_table)/4