Back to home page

LXR

 
 

    


0001 ###############################################################################
0002 #
0003 # MN10300 Exception and interrupt entry points
0004 #
0005 # Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
0006 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
0007 # Modified by David Howells (dhowells@redhat.com)
0008 #
0009 # This program is free software; you can redistribute it and/or
0010 # modify it under the terms of the GNU General Public Licence
0011 # as published by the Free Software Foundation; either version
0012 # 2 of the Licence, or (at your option) any later version.
0013 #
0014 ###############################################################################
0015 #include <linux/sys.h>
0016 #include <linux/linkage.h>
0017 #include <asm/smp.h>
0018 #include <asm/irqflags.h>
0019 #include <asm/thread_info.h>
0020 #include <asm/intctl-regs.h>
0021 #include <asm/busctl-regs.h>
0022 #include <asm/timer-regs.h>
0023 #include <unit/leds.h>
0024 #include <asm/page.h>
0025 #include <asm/pgtable.h>
0026 #include <asm/errno.h>
0027 #include <asm/asm-offsets.h>
0028 #include <asm/frame.inc>
0029 
0030 #if defined(CONFIG_SMP) && defined(CONFIG_GDBSTUB)
0031 #include <asm/gdb-stub.h>
0032 #endif /* CONFIG_SMP && CONFIG_GDBSTUB */
0033 
0034 #ifdef CONFIG_PREEMPT
0035 #define preempt_stop        LOCAL_IRQ_DISABLE
0036 #else
0037 #define preempt_stop
0038 #define resume_kernel       restore_all
0039 #endif
0040 
0041     .am33_2
0042 
0043 ###############################################################################
0044 #
0045 # the return path for a forked child
0046 # - on entry, D0 holds the address of the previous task to run
0047 #
0048 ###############################################################################
0049 ENTRY(ret_from_fork)
0050     call    schedule_tail[],0
0051     GET_THREAD_INFO a2
0052 
0053     # return 0 to indicate child process
0054     clr d0
0055     mov d0,(REG_D0,fp)
0056     jmp syscall_exit
0057 
0058 ENTRY(ret_from_kernel_thread)
0059     call    schedule_tail[],0
0060     mov (REG_D0,fp),d0
0061     mov (REG_A0,fp),a0
0062     calls   (a0)
0063     GET_THREAD_INFO a2      # A2 must be set on return from sys_exit()
0064     clr d0
0065     mov d0,(REG_D0,fp)
0066     jmp syscall_exit
0067 
0068 ###############################################################################
0069 #
0070 # system call handler
0071 #
0072 ###############################################################################
0073 ENTRY(system_call)
0074     add -4,sp
0075     SAVE_ALL
0076     mov d0,(REG_ORIG_D0,fp)
0077     GET_THREAD_INFO a2
0078     cmp nr_syscalls,d0
0079     bcc syscall_badsys
0080     btst    _TIF_SYSCALL_TRACE,(TI_flags,a2)
0081     bne syscall_entry_trace
0082 syscall_call:
0083     add d0,d0,a1
0084     add a1,a1
0085     mov (REG_A0,fp),d0
0086     mov (sys_call_table,a1),a0
0087     calls   (a0)
0088     mov d0,(REG_D0,fp)
0089 syscall_exit:
0090     # make sure we don't miss an interrupt setting need_resched or
0091     # sigpending between sampling and the rti
0092     LOCAL_IRQ_DISABLE
0093     mov (TI_flags,a2),d2
0094     btst    _TIF_ALLWORK_MASK,d2
0095     bne syscall_exit_work
0096 restore_all:
0097     RESTORE_ALL
0098 
0099 ###############################################################################
0100 #
0101 # perform work that needs to be done immediately before resumption and syscall
0102 # tracing
0103 #
0104 ###############################################################################
0105     ALIGN
0106 syscall_exit_work:
0107     mov (REG_EPSW,fp),d0
0108     and EPSW_nSL,d0
0109     beq resume_kernel       # returning to supervisor mode
0110 
0111     LOCAL_IRQ_ENABLE        # could let syscall_trace_exit() call
0112                     # schedule() instead
0113     btst    _TIF_SYSCALL_TRACE,d2
0114     beq work_pending
0115     mov fp,d0
0116     call    syscall_trace_exit[],0  # do_syscall_trace(regs)
0117     jmp resume_userspace
0118 
0119     ALIGN
0120 work_pending:
0121     btst    _TIF_NEED_RESCHED,d2
0122     beq work_notifysig
0123 
0124 work_resched:
0125     call    schedule[],0
0126 
0127 resume_userspace:
0128     # make sure we don't miss an interrupt setting need_resched or
0129     # sigpending between sampling and the rti
0130     LOCAL_IRQ_DISABLE
0131 
0132     # is there any work to be done other than syscall tracing?
0133     mov (TI_flags,a2),d2
0134     btst    _TIF_WORK_MASK,d2
0135     beq restore_all
0136 
0137     LOCAL_IRQ_ENABLE
0138     btst    _TIF_NEED_RESCHED,d2
0139     bne work_resched
0140 
0141     # deal with pending signals and notify-resume requests
0142 work_notifysig:
0143     mov fp,d0
0144     mov d2,d1
0145     call    do_notify_resume[],0
0146     jmp resume_userspace
0147 
0148     # perform syscall entry tracing
0149 syscall_entry_trace:
0150     mov -ENOSYS,d0
0151     mov d0,(REG_D0,fp)
0152     mov fp,d0
0153     call    syscall_trace_entry[],0 # returns the syscall number to actually use
0154     mov (REG_D1,fp),d1
0155     cmp nr_syscalls,d0
0156     bcs syscall_call
0157     jmp syscall_exit
0158 
0159 syscall_badsys:
0160     mov -ENOSYS,d0
0161     mov d0,(REG_D0,fp)
0162     jmp resume_userspace
0163 
0164     # userspace resumption stub bypassing syscall exit tracing
0165     .globl  ret_from_exception, ret_from_intr
0166     ALIGN
0167 ret_from_exception:
0168     preempt_stop
0169 ret_from_intr:
0170     GET_THREAD_INFO a2
0171     mov (REG_EPSW,fp),d0    # need to deliver signals before
0172                     # returning to userspace
0173     and EPSW_nSL,d0
0174     bne resume_userspace    # returning to userspace
0175 
0176 #ifdef CONFIG_PREEMPT
0177 resume_kernel:
0178     LOCAL_IRQ_DISABLE
0179     mov (TI_preempt_count,a2),d0    # non-zero preempt_count ?
0180     cmp 0,d0
0181     bne restore_all
0182 
0183 need_resched:
0184     btst    _TIF_NEED_RESCHED,(TI_flags,a2)
0185     beq restore_all
0186     mov (REG_EPSW,fp),d0
0187     and EPSW_IM,d0
0188     cmp EPSW_IM_7,d0        # interrupts off (exception path) ?
0189     bne restore_all
0190     call    preempt_schedule_irq[],0
0191     jmp need_resched
0192 #else
0193     jmp resume_kernel
0194 #endif
0195 
0196 
0197 ###############################################################################
0198 #
0199 # IRQ handler entry point
0200 # - intended to be entered at multiple priorities
0201 #
0202 ###############################################################################
0203 ENTRY(irq_handler)
0204     add -4,sp
0205     SAVE_ALL
0206 
0207     # it's not a syscall
0208     mov 0xffffffff,d0
0209     mov d0,(REG_ORIG_D0,fp)
0210 
0211     mov fp,d0
0212     call    do_IRQ[],0          # do_IRQ(regs)
0213 
0214     jmp ret_from_intr
0215 
0216 ###############################################################################
0217 #
0218 # Double Fault handler entry point
0219 # - note that there will not be a stack, D0/A0 will hold EPSW/PC as were
0220 #
0221 ###############################################################################
0222     .section .bss
0223     .balign THREAD_SIZE
0224     .space  THREAD_SIZE
0225 __df_stack:
0226     .previous
0227 
0228 ENTRY(double_fault)
0229     mov a0,(__df_stack-4)   # PC as was
0230     mov d0,(__df_stack-8)   # EPSW as was
0231     mn10300_set_dbfleds     # display 'db-f' on the LEDs
0232     mov 0xaa55aa55,d0
0233     mov d0,(__df_stack-12)  # no ORIG_D0
0234     mov sp,a0           # save corrupted SP
0235     mov __df_stack-12,sp    # emergency supervisor stack
0236     SAVE_ALL
0237     mov a0,(REG_A0,fp)      # save corrupted SP as A0 (which got
0238                     # clobbered by the CPU)
0239     mov fp,d0
0240     calls   do_double_fault
0241 double_fault_loop:
0242     bra double_fault_loop
0243 
0244 ###############################################################################
0245 #
0246 # Bus Error handler entry point
0247 # - handle external (async) bus errors separately
0248 #
0249 ###############################################################################
0250 ENTRY(raw_bus_error)
0251     add -4,sp
0252     mov d0,(sp)
0253 #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
0254     mov (MMUCTR),d0
0255     mov d0,(MMUCTR)
0256 #endif
0257     mov (BCBERR),d0     # what
0258     btst    BCBERR_BEMR_DMA,d0  # see if it was an external bus error
0259     beq __common_exception_aux  # it wasn't
0260 
0261     SAVE_ALL
0262     mov (BCBEAR),d1     # destination of erroneous access
0263 
0264     mov (REG_ORIG_D0,fp),d2
0265     mov d2,(REG_D0,fp)
0266     mov -1,d2
0267     mov d2,(REG_ORIG_D0,fp)
0268 
0269     add -4,sp
0270     mov fp,(12,sp)      # frame pointer
0271     call    io_bus_error[],0
0272     jmp restore_all
0273 
0274 ###############################################################################
0275 #
0276 # NMI exception entry points
0277 #
0278 # This is used by ordinary interrupt channels that have the GxICR_NMI bit set
0279 # in addition to the main NMI and Watchdog channels.  SMP NMI IPIs use this
0280 # facility.
0281 #
0282 ###############################################################################
0283 ENTRY(nmi_handler)
0284     add -4,sp
0285     mov d0,(sp)
0286     mov (TBR),d0
0287 
0288 #ifdef CONFIG_SMP
0289     add -4,sp
0290     mov d0,(sp)         # save d0(TBR)
0291     movhu   (NMIAGR),d0
0292     and NMIAGR_GN,d0
0293     lsr 0x2,d0
0294     cmp CALL_FUNCTION_NMI_IPI,d0
0295     bne nmi_not_smp_callfunc    # if not call function, jump
0296 
0297     # function call nmi ipi
0298     add 4,sp            # no need to store TBR
0299     mov GxICR_DETECT,d0     # clear NMI request
0300     movbu   d0,(GxICR(CALL_FUNCTION_NMI_IPI))
0301     movhu   (GxICR(CALL_FUNCTION_NMI_IPI)),d0
0302     and ~EPSW_NMID,epsw     # enable NMI
0303 
0304     mov (sp),d0         # restore d0
0305     SAVE_ALL
0306     call    smp_nmi_call_function_interrupt[],0
0307     RESTORE_ALL
0308 
0309 nmi_not_smp_callfunc:
0310 #ifdef CONFIG_KERNEL_DEBUGGER
0311     cmp DEBUGGER_NMI_IPI,d0
0312     bne nmi_not_debugger    # if not kernel debugger NMI IPI, jump
0313 
0314     # kernel debugger NMI IPI
0315     add 4,sp            # no need to store TBR
0316     mov GxICR_DETECT,d0     # clear NMI
0317     movbu   d0,(GxICR(DEBUGGER_NMI_IPI))
0318     movhu   (GxICR(DEBUGGER_NMI_IPI)),d0
0319     and ~EPSW_NMID,epsw     # enable NMI
0320 
0321     mov     (sp),d0
0322     SAVE_ALL
0323     mov fp,d0           # arg 0: stacked register file
0324     mov a2,d1           # arg 1: exception number
0325     call    debugger_nmi_interrupt[],0
0326     RESTORE_ALL
0327 
0328 nmi_not_debugger:
0329 #endif /* CONFIG_KERNEL_DEBUGGER */
0330     mov     (sp),d0                 # restore TBR to d0
0331     add     4,sp
0332 #endif /* CONFIG_SMP */
0333 
0334     bra __common_exception_nonmi
0335 
0336 ###############################################################################
0337 #
0338 # General exception entry point
0339 #
0340 ###############################################################################
0341 ENTRY(__common_exception)
0342     add -4,sp
0343     mov d0,(sp)
0344 #if defined(CONFIG_ERRATUM_NEED_TO_RELOAD_MMUCTR)
0345     mov (MMUCTR),d0
0346     mov d0,(MMUCTR)
0347 #endif
0348 
0349 __common_exception_aux:
0350     mov (TBR),d0
0351     and ~EPSW_NMID,epsw     # turn NMIs back on if not NMI
0352     or  EPSW_IE,epsw
0353 
0354 __common_exception_nonmi:
0355     and 0x0000FFFF,d0       # turn the exception code into a vector
0356                     # table index
0357 
0358     btst    0x00000007,d0
0359     bne 1f
0360     cmp 0x00000400,d0
0361     bge 1f
0362 
0363     SAVE_ALL            # build the stack frame
0364 
0365     mov (REG_D0,fp),a2      # get the exception number
0366     mov (REG_ORIG_D0,fp),d0
0367     mov d0,(REG_D0,fp)
0368     mov -1,d0
0369     mov d0,(REG_ORIG_D0,fp)
0370 
0371 #ifdef CONFIG_GDBSTUB
0372 #ifdef CONFIG_SMP
0373     call    gdbstub_busy_check[],0
0374     and d0,d0           # check return value
0375     beq 2f
0376 #else  /* CONFIG_SMP */
0377     btst    0x01,(gdbstub_busy)
0378     beq 2f
0379 #endif /* CONFIG_SMP */
0380     and ~EPSW_IE,epsw
0381     mov fp,d0
0382     mov a2,d1
0383     call    gdbstub_exception[],0   # gdbstub itself caused an exception
0384     bra restore_all
0385 2:
0386 #endif /* CONFIG_GDBSTUB */
0387 
0388     mov fp,d0           # arg 0: stacked register file
0389     mov a2,d1           # arg 1: exception number
0390     lsr 1,a2
0391 
0392     mov (exception_table,a2),a2
0393     calls   (a2)
0394     jmp ret_from_exception
0395 
0396 1:  pi              # BUG() equivalent
0397 
0398 ###############################################################################
0399 #
0400 # Exception handler functions table
0401 #
0402 ###############################################################################
0403     .data
0404 ENTRY(exception_table)
0405     .rept   0x400>>1
0406      .long  uninitialised_exception
0407     .endr
0408     .previous
0409 
0410 ###############################################################################
0411 #
0412 # Change an entry in the exception table
0413 # - D0 exception code, D1 handler
0414 #
0415 ###############################################################################
0416 ENTRY(set_excp_vector)
0417     lsr 1,d0
0418     add exception_table,d0
0419     mov d1,(d0)
0420     mov 4,d1
0421     ret [],0
0422 
0423 ###############################################################################
0424 #
0425 # System call table
0426 #
0427 ###############################################################################
0428     .data
0429 ENTRY(sys_call_table)
0430     .long sys_restart_syscall   /* 0 */
0431     .long sys_exit
0432     .long sys_fork
0433     .long sys_read
0434     .long sys_write
0435     .long sys_open      /* 5 */
0436     .long sys_close
0437     .long sys_waitpid
0438     .long sys_creat
0439     .long sys_link
0440     .long sys_unlink    /* 10 */
0441     .long sys_execve
0442     .long sys_chdir
0443     .long sys_time
0444     .long sys_mknod
0445     .long sys_chmod     /* 15 */
0446     .long sys_lchown16
0447     .long sys_ni_syscall    /* old break syscall holder */
0448     .long sys_stat
0449     .long sys_lseek
0450     .long sys_getpid    /* 20 */
0451     .long sys_mount
0452     .long sys_oldumount
0453     .long sys_setuid16
0454     .long sys_getuid16
0455     .long sys_stime     /* 25 */
0456     .long sys_ptrace
0457     .long sys_alarm
0458     .long sys_fstat
0459     .long sys_pause
0460     .long sys_utime     /* 30 */
0461     .long sys_ni_syscall    /* old stty syscall holder */
0462     .long sys_ni_syscall    /* old gtty syscall holder */
0463     .long sys_access
0464     .long sys_nice
0465     .long sys_ni_syscall    /* 35 - old ftime syscall holder */
0466     .long sys_sync
0467     .long sys_kill
0468     .long sys_rename
0469     .long sys_mkdir
0470     .long sys_rmdir     /* 40 */
0471     .long sys_dup
0472     .long sys_pipe
0473     .long sys_times
0474     .long sys_ni_syscall    /* old prof syscall holder */
0475     .long sys_brk       /* 45 */
0476     .long sys_setgid16
0477     .long sys_getgid16
0478     .long sys_signal
0479     .long sys_geteuid16
0480     .long sys_getegid16 /* 50 */
0481     .long sys_acct
0482     .long sys_umount    /* recycled never used phys() */
0483     .long sys_ni_syscall    /* old lock syscall holder */
0484     .long sys_ioctl
0485     .long sys_fcntl     /* 55 */
0486     .long sys_ni_syscall    /* old mpx syscall holder */
0487     .long sys_setpgid
0488     .long sys_ni_syscall    /* old ulimit syscall holder */
0489     .long sys_ni_syscall    /* old sys_olduname */
0490     .long sys_umask     /* 60 */
0491     .long sys_chroot
0492     .long sys_ustat
0493     .long sys_dup2
0494     .long sys_getppid
0495     .long sys_getpgrp   /* 65 */
0496     .long sys_setsid
0497     .long sys_sigaction
0498     .long sys_sgetmask
0499     .long sys_ssetmask
0500     .long sys_setreuid16    /* 70 */
0501     .long sys_setregid16
0502     .long sys_sigsuspend
0503     .long sys_sigpending
0504     .long sys_sethostname
0505     .long sys_setrlimit /* 75 */
0506     .long sys_old_getrlimit
0507     .long sys_getrusage
0508     .long sys_gettimeofday
0509     .long sys_settimeofday
0510     .long sys_getgroups16   /* 80 */
0511     .long sys_setgroups16
0512     .long sys_old_select
0513     .long sys_symlink
0514     .long sys_lstat
0515     .long sys_readlink  /* 85 */
0516     .long sys_uselib
0517     .long sys_swapon
0518     .long sys_reboot
0519     .long sys_old_readdir
0520     .long old_mmap      /* 90 */
0521     .long sys_munmap
0522     .long sys_truncate
0523     .long sys_ftruncate
0524     .long sys_fchmod
0525     .long sys_fchown16  /* 95 */
0526     .long sys_getpriority
0527     .long sys_setpriority
0528     .long sys_ni_syscall    /* old profil syscall holder */
0529     .long sys_statfs
0530     .long sys_fstatfs   /* 100 */
0531     .long sys_ni_syscall    /* ioperm */
0532     .long sys_socketcall
0533     .long sys_syslog
0534     .long sys_setitimer
0535     .long sys_getitimer /* 105 */
0536     .long sys_newstat
0537     .long sys_newlstat
0538     .long sys_newfstat
0539     .long sys_ni_syscall    /* old sys_uname */
0540     .long sys_ni_syscall    /* 110 - iopl */
0541     .long sys_vhangup
0542     .long sys_ni_syscall    /* old "idle" system call */
0543     .long sys_ni_syscall    /* vm86old */
0544     .long sys_wait4
0545     .long sys_swapoff   /* 115 */
0546     .long sys_sysinfo
0547     .long sys_ipc
0548     .long sys_fsync
0549     .long sys_sigreturn
0550     .long sys_clone     /* 120 */
0551     .long sys_setdomainname
0552     .long sys_newuname
0553     .long sys_ni_syscall    /* modify_ldt */
0554     .long sys_adjtimex
0555     .long sys_mprotect  /* 125 */
0556     .long sys_sigprocmask
0557     .long sys_ni_syscall    /* old "create_module" */
0558     .long sys_init_module
0559     .long sys_delete_module
0560     .long sys_ni_syscall    /* 130: old "get_kernel_syms" */
0561     .long sys_quotactl
0562     .long sys_getpgid
0563     .long sys_fchdir
0564     .long sys_bdflush
0565     .long sys_sysfs     /* 135 */
0566     .long sys_personality
0567     .long sys_ni_syscall    /* reserved for afs_syscall */
0568     .long sys_setfsuid16
0569     .long sys_setfsgid16
0570     .long sys_llseek    /* 140 */
0571     .long sys_getdents
0572     .long sys_select
0573     .long sys_flock
0574     .long sys_msync
0575     .long sys_readv     /* 145 */
0576     .long sys_writev
0577     .long sys_getsid
0578     .long sys_fdatasync
0579     .long sys_sysctl
0580     .long sys_mlock     /* 150 */
0581     .long sys_munlock
0582     .long sys_mlockall
0583     .long sys_munlockall
0584     .long sys_sched_setparam
0585     .long sys_sched_getparam   /* 155 */
0586     .long sys_sched_setscheduler
0587     .long sys_sched_getscheduler
0588     .long sys_sched_yield
0589     .long sys_sched_get_priority_max
0590     .long sys_sched_get_priority_min  /* 160 */
0591     .long sys_sched_rr_get_interval
0592     .long sys_nanosleep
0593     .long sys_mremap
0594     .long sys_setresuid16
0595     .long sys_getresuid16   /* 165 */
0596     .long sys_ni_syscall    /* vm86 */
0597     .long sys_ni_syscall    /* Old sys_query_module */
0598     .long sys_poll
0599     .long sys_ni_syscall    /* was nfsservctl */
0600     .long sys_setresgid16   /* 170 */
0601     .long sys_getresgid16
0602     .long sys_prctl
0603     .long sys_rt_sigreturn
0604     .long sys_rt_sigaction
0605     .long sys_rt_sigprocmask    /* 175 */
0606     .long sys_rt_sigpending
0607     .long sys_rt_sigtimedwait
0608     .long sys_rt_sigqueueinfo
0609     .long sys_rt_sigsuspend
0610     .long sys_pread64   /* 180 */
0611     .long sys_pwrite64
0612     .long sys_chown16
0613     .long sys_getcwd
0614     .long sys_capget
0615     .long sys_capset    /* 185 */
0616     .long sys_sigaltstack
0617     .long sys_sendfile
0618     .long sys_ni_syscall    /* reserved for streams1 */
0619     .long sys_ni_syscall    /* reserved for streams2 */
0620     .long sys_vfork     /* 190 */
0621     .long sys_getrlimit
0622     .long sys_mmap_pgoff
0623     .long sys_truncate64
0624     .long sys_ftruncate64
0625     .long sys_stat64    /* 195 */
0626     .long sys_lstat64
0627     .long sys_fstat64
0628     .long sys_lchown
0629     .long sys_getuid
0630     .long sys_getgid    /* 200 */
0631     .long sys_geteuid
0632     .long sys_getegid
0633     .long sys_setreuid
0634     .long sys_setregid
0635     .long sys_getgroups /* 205 */
0636     .long sys_setgroups
0637     .long sys_fchown
0638     .long sys_setresuid
0639     .long sys_getresuid
0640     .long sys_setresgid /* 210 */
0641     .long sys_getresgid
0642     .long sys_chown
0643     .long sys_setuid
0644     .long sys_setgid
0645     .long sys_setfsuid  /* 215 */
0646     .long sys_setfsgid
0647     .long sys_pivot_root
0648     .long sys_mincore
0649     .long sys_madvise
0650     .long sys_getdents64    /* 220 */
0651     .long sys_fcntl64
0652     .long sys_ni_syscall    /* reserved for TUX */
0653     .long sys_ni_syscall
0654     .long sys_gettid
0655     .long sys_readahead /* 225 */
0656     .long sys_setxattr
0657     .long sys_lsetxattr
0658     .long sys_fsetxattr
0659     .long sys_getxattr
0660     .long sys_lgetxattr /* 230 */
0661     .long sys_fgetxattr
0662     .long sys_listxattr
0663     .long sys_llistxattr
0664     .long sys_flistxattr
0665     .long sys_removexattr   /* 235 */
0666     .long sys_lremovexattr
0667     .long sys_fremovexattr
0668     .long sys_tkill
0669     .long sys_sendfile64
0670     .long sys_futex     /* 240 */
0671     .long sys_sched_setaffinity
0672     .long sys_sched_getaffinity
0673     .long sys_ni_syscall    /* sys_set_thread_area */
0674     .long sys_ni_syscall    /* sys_get_thread_area */
0675     .long sys_io_setup  /* 245 */
0676     .long sys_io_destroy
0677     .long sys_io_getevents
0678     .long sys_io_submit
0679     .long sys_io_cancel
0680     .long sys_fadvise64 /* 250 */
0681     .long sys_ni_syscall
0682     .long sys_exit_group
0683     .long sys_lookup_dcookie
0684     .long sys_epoll_create
0685     .long sys_epoll_ctl /* 255 */
0686     .long sys_epoll_wait
0687     .long sys_remap_file_pages
0688     .long sys_set_tid_address
0689     .long sys_timer_create
0690     .long sys_timer_settime     /* 260 */
0691     .long sys_timer_gettime
0692     .long sys_timer_getoverrun
0693     .long sys_timer_delete
0694     .long sys_clock_settime
0695     .long sys_clock_gettime     /* 265 */
0696     .long sys_clock_getres
0697     .long sys_clock_nanosleep
0698     .long sys_statfs64
0699     .long sys_fstatfs64
0700     .long sys_tgkill        /* 270 */
0701     .long sys_utimes
0702     .long sys_fadvise64_64
0703     .long sys_ni_syscall    /* sys_vserver */
0704     .long sys_mbind
0705     .long sys_get_mempolicy     /* 275 */
0706     .long sys_set_mempolicy
0707     .long sys_mq_open
0708     .long sys_mq_unlink
0709     .long sys_mq_timedsend
0710     .long sys_mq_timedreceive   /* 280 */
0711     .long sys_mq_notify
0712     .long sys_mq_getsetattr
0713     .long sys_kexec_load
0714     .long sys_waitid
0715     .long sys_ni_syscall        /* 285 */ /* available */
0716     .long sys_add_key
0717     .long sys_request_key
0718     .long sys_keyctl
0719     .long sys_cacheflush
0720     .long sys_ioprio_set        /* 290 */
0721     .long sys_ioprio_get
0722     .long sys_inotify_init
0723     .long sys_inotify_add_watch
0724     .long sys_inotify_rm_watch
0725     .long sys_migrate_pages     /* 295 */
0726     .long sys_openat
0727     .long sys_mkdirat
0728     .long sys_mknodat
0729     .long sys_fchownat
0730     .long sys_futimesat     /* 300 */
0731     .long sys_fstatat64
0732     .long sys_unlinkat
0733     .long sys_renameat
0734     .long sys_linkat
0735     .long sys_symlinkat     /* 305 */
0736     .long sys_readlinkat
0737     .long sys_fchmodat
0738     .long sys_faccessat
0739     .long sys_pselect6
0740     .long sys_ppoll         /* 310 */
0741     .long sys_unshare
0742     .long sys_set_robust_list
0743     .long sys_get_robust_list
0744     .long sys_splice
0745     .long sys_sync_file_range   /* 315 */
0746     .long sys_tee
0747     .long sys_vmsplice
0748     .long sys_move_pages
0749     .long sys_getcpu
0750     .long sys_epoll_pwait       /* 320 */
0751     .long sys_utimensat
0752     .long sys_signalfd
0753     .long sys_timerfd_create
0754     .long sys_eventfd
0755     .long sys_fallocate     /* 325 */
0756     .long sys_timerfd_settime
0757     .long sys_timerfd_gettime
0758     .long sys_signalfd4
0759     .long sys_eventfd2
0760     .long sys_epoll_create1     /* 330 */
0761     .long sys_dup3
0762     .long sys_pipe2
0763     .long sys_inotify_init1
0764     .long sys_preadv
0765     .long sys_pwritev       /* 335 */
0766     .long sys_rt_tgsigqueueinfo
0767     .long sys_perf_event_open
0768     .long sys_recvmmsg
0769     .long sys_setns
0770 
0771 
0772 nr_syscalls=(.-sys_call_table)/4