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