| .. | .. |
|---|
| 4 | 4 | #include <linux/linkage.h> |
|---|
| 5 | 5 | #include <linux/sys.h> |
|---|
| 6 | 6 | #include <linux/cache.h> |
|---|
| 7 | | -#include <asm/asm-offsets.h> |
|---|
| 7 | +#include <linux/syscalls.h> |
|---|
| 8 | +#include <asm/unistd.h> |
|---|
| 8 | 9 | #include <asm/syscall.h> |
|---|
| 9 | 10 | |
|---|
| 10 | | -#ifdef CONFIG_IA32_EMULATION |
|---|
| 11 | | -/* On X86_64, we use struct pt_regs * to pass parameters to syscalls */ |
|---|
| 12 | | -#define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(const struct pt_regs *); |
|---|
| 13 | | -#define __sys_ni_syscall __ia32_sys_ni_syscall |
|---|
| 14 | | -#else /* CONFIG_IA32_EMULATION */ |
|---|
| 15 | | -#define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
|---|
| 16 | | -extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); |
|---|
| 17 | | -#define __sys_ni_syscall sys_ni_syscall |
|---|
| 18 | | -#endif /* CONFIG_IA32_EMULATION */ |
|---|
| 11 | +#define __SYSCALL_I386(nr, sym) extern long __ia32_##sym(const struct pt_regs *); |
|---|
| 19 | 12 | |
|---|
| 20 | 13 | #include <asm/syscalls_32.h> |
|---|
| 21 | 14 | #undef __SYSCALL_I386 |
|---|
| 22 | 15 | |
|---|
| 23 | | -#define __SYSCALL_I386(nr, sym, qual) [nr] = sym, |
|---|
| 16 | +#define __SYSCALL_I386(nr, sym) [nr] = __ia32_##sym, |
|---|
| 24 | 17 | |
|---|
| 25 | | -__visible const sys_call_ptr_t ia32_sys_call_table[__NR_syscall_compat_max+1] = { |
|---|
| 18 | +__visible const sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = { |
|---|
| 26 | 19 | /* |
|---|
| 27 | 20 | * Smells like a compiler bug -- it doesn't work |
|---|
| 28 | 21 | * when the & below is removed. |
|---|
| 29 | 22 | */ |
|---|
| 30 | | - [0 ... __NR_syscall_compat_max] = &__sys_ni_syscall, |
|---|
| 23 | + [0 ... __NR_ia32_syscall_max] = &__ia32_sys_ni_syscall, |
|---|
| 31 | 24 | #include <asm/syscalls_32.h> |
|---|
| 32 | 25 | }; |
|---|