2011-11-12 08:07:41 +08:00
|
|
|
/* System call table for i386. */
|
|
|
|
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/sys.h>
|
|
|
|
#include <linux/cache.h>
|
|
|
|
#include <asm/asm-offsets.h>
|
|
|
|
|
2015-03-04 11:31:33 +08:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
#define SYM(sym, compat) compat
|
|
|
|
#else
|
|
|
|
#define SYM(sym, compat) sym
|
|
|
|
#define ia32_sys_call_table sys_call_table
|
2015-06-09 03:20:26 +08:00
|
|
|
#define __NR_syscall_compat_max __NR_syscall_max
|
2015-03-04 11:31:33 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ;
|
2011-11-12 08:07:41 +08:00
|
|
|
#include <asm/syscalls_32.h>
|
|
|
|
#undef __SYSCALL_I386
|
|
|
|
|
2015-03-04 11:31:33 +08:00
|
|
|
#define __SYSCALL_I386(nr, sym, compat) [nr] = SYM(sym, compat),
|
2011-11-12 08:07:41 +08:00
|
|
|
|
|
|
|
typedef asmlinkage void (*sys_call_ptr_t)(void);
|
|
|
|
|
|
|
|
extern asmlinkage void sys_ni_syscall(void);
|
|
|
|
|
2015-06-09 03:20:26 +08:00
|
|
|
__visible const sys_call_ptr_t ia32_sys_call_table[__NR_syscall_compat_max+1] = {
|
2011-11-12 08:07:41 +08:00
|
|
|
/*
|
2011-11-19 08:25:07 +08:00
|
|
|
* Smells like a compiler bug -- it doesn't work
|
2011-11-12 08:07:41 +08:00
|
|
|
* when the & below is removed.
|
|
|
|
*/
|
2015-06-09 03:20:26 +08:00
|
|
|
[0 ... __NR_syscall_compat_max] = &sys_ni_syscall,
|
2011-11-12 08:07:41 +08:00
|
|
|
#include <asm/syscalls_32.h>
|
|
|
|
};
|