syscall_64.c 1021 B

1234567891011121314151617181920212223242526272829303132
  1. /* System call table for x86-64. */
  2. #include <linux/linkage.h>
  3. #include <linux/sys.h>
  4. #include <linux/cache.h>
  5. #include <asm/asm-offsets.h>
  6. #include <asm/syscall.h>
  7. #define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat)
  8. #ifdef CONFIG_X86_X32_ABI
  9. # define __SYSCALL_X32(nr, sym, compat) __SYSCALL_64(nr, sym, compat)
  10. #else
  11. # define __SYSCALL_X32(nr, sym, compat) /* nothing */
  12. #endif
  13. #define __SYSCALL_64(nr, sym, compat) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) ;
  14. #include <asm/syscalls_64.h>
  15. #undef __SYSCALL_64
  16. #define __SYSCALL_64(nr, sym, compat) [nr] = sym,
  17. extern long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
  18. asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
  19. /*
  20. * Smells like a compiler bug -- it doesn't work
  21. * when the & below is removed.
  22. */
  23. [0 ... __NR_syscall_max] = &sys_ni_syscall,
  24. #include <asm/syscalls_64.h>
  25. };