Search notes:

arch/x86/entry/common.c

do_syscall_64()

do_syscall_64() is called from entry_SYSCALL_64 (assembly code in arch/x86/entry/entry_64.S).
do_syscall_64() calls do_syscall_x64()
The signature of do_syscall_64 is
__visible noinstr
void do_syscall_64(
   struct pt_regs *regs,
   int             nr
)

do_syscall_x64()

do_syscall_x64() looks up passed sys call number (2nd argument) in the sys_call_table array of function pointers and calls the function. The return value is assigned to the ax register.
do_syscall_x64() is called by do_syscall_64().

Index