arch/x86/include/generated/asm/syscalls_64.h twice, with different definitions for __SYSCALL: #define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *); #include <asm/syscalls_64.h> #undef __SYSCALL
#define __SYSCALL(nr, sym) __x64_##sym,
asmlinkage const sys_call_ptr_t sys_call_table[] = {
#include <asm/syscalls_64.h>
}
x64_sys_call(struct pt_regs, int nr) is called from do_syscall_x64