I was looking into asmlinkage tag.
From https://kernelnewbies.org/FAQ/asmlinkage
This is a #define for some gcc magic that tells the compiler that the function should not expect to find any of its arguments in registers (a common optimization), but only on the CPU's stack.
Looking into definition, it is defined to empty for x86_64
#ifdef __cplusplus
#define CPP_ASMLINKAGE extern "C"
#else
#define CPP_ASMLINKAGE
#endif
#ifndef asmlinkage
#define asmlinkage CPP_ASMLINKAGE
#endif
Also, i read that the ABI spec says that we should place system call number in a register, and paramters in some other registers.
Then why we are looking for function parameters in stack. Is system call number also placed in stack?