mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 16:56:49 +07:00
303395ac3b
Generate system call tables and unistd_*.h automatically from the tables in arch/x86/syscalls. All other information, like NR_syscalls, is auto-generated, some of which is in asm-offsets_*.c. This allows us to keep all the system call information in one place, and allows for kernel space and user space to see different information; this is currently used for the ia32 system call numbers when building the 64-bit kernel, but will be used by the x32 ABI in the near future. This also removes some gratuitious differences between i386, x86-64 and ia32; in particular, now all system call tables are generated with the same mechanism. Cc: H. J. Lu <hjl.tools@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
26 lines
619 B
C
26 lines
619 B
C
/* System call table for x86-64. */
|
|
|
|
#include <linux/linkage.h>
|
|
#include <linux/sys.h>
|
|
#include <linux/cache.h>
|
|
#include <asm/asm-offsets.h>
|
|
|
|
#define __SYSCALL_64(nr, sym, compat) extern asmlinkage void sym(void) ;
|
|
#include <asm/syscalls_64.h>
|
|
#undef __SYSCALL_64
|
|
|
|
#define __SYSCALL_64(nr, sym, compat) [nr] = sym,
|
|
|
|
typedef void (*sys_call_ptr_t)(void);
|
|
|
|
extern void sys_ni_syscall(void);
|
|
|
|
const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
|
|
/*
|
|
* Smells like a compiler bug -- it doesn't work
|
|
* when the & below is removed.
|
|
*/
|
|
[0 ... __NR_syscall_max] = &sys_ni_syscall,
|
|
#include <asm/syscalls_64.h>
|
|
};
|