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