References: <[email protected]>
In-Reply-To: <[email protected]>
Shared ia32 syscall table 7/9:
Switch x86_64 to the new ia32 syscall table.
Some functions need to be overridden.
Signed-Off-By: Chuck Ebbert <[email protected]>
---
arch/x86_64/ia32/ia32entry.S | 40 +++++++++++++++++++++++++++++++++++++++
include/asm-x86_64/ia32_unistd.h | 7 ++++--
2 files changed, 45 insertions(+), 2 deletions(-)
--- 2.6.16-rc1-mm2.orig/arch/x86_64/ia32/ia32entry.S
+++ 2.6.16-rc1-mm2/arch/x86_64/ia32/ia32entry.S
@@ -373,6 +373,47 @@
.align 8
.globl ia32_sys_call_table
ia32_sys_call_table:
+
+#define syscall_ptr_type .quad
+#define SYSCALL(func) RAWSYSCALL(sys_ ## func)
+#define SYS32CALL(func) RAWSYSCALL(sys32_ ## func)
+#define STUB32CALL(func) RAWSYSCALL(stub32_ ## func)
+#define COMPATCALL(func) RAWSYSCALL(compat_sys_ ## func)
+
+/*
+ * Don't allow uselib() if a.out support is disabled.
+ */
+#ifndef CONFIG_IA32_AOUT
+# define sys_uselib sys32_ni_syscall
+#endif
+
+/*
+ * Two function names do not match i386.
+ */
+#define old_readdir compat_sys_old_readdir
+#define compat_sys_fcntl compat_sys_fcntl64
+
+/*
+ * vm86 is not possible on x86_64.
+ */
+#define sys32_vm86old sys32_vm86_warning
+#define sys32_vm86 sys32_vm86_warning
+
+/*
+ * bdflush is unsupported
+ */
+#define sys_bdflush sys32_ni_syscall
+
+/*
+ * Not implemented on this arch yet.
+ */
+#define sys_pselect6 sys32_ni_syscall
+#define sys_ppoll sys32_ni_syscall
+#define sys_epoll_pwait sys32_ni_syscall
+
+#include "../../i386/kernel/syscall_tbl.S"
+
+#if 0
.quad sys_restart_syscall
.quad sys_exit
.quad stub32_fork
@@ -686,6 +727,10 @@
.quad sys_fchmodat
.quad sys_faccessat
.quad sys_unshare
+#endif
+
+/* RED-PEN: find a way to determine IA32_NR_syscalls automatically */
+
ia32_syscall_end:
.rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
.quad ni_syscall
--- 2.6.16-rc1-mm2.orig/include/asm-x86_64/ia32_unistd.h
+++ 2.6.16-rc1-mm2/include/asm-x86_64/ia32_unistd.h
@@ -313,8 +313,11 @@
#define __NR_ia32_readlinkat 305
#define __NR_ia32_fchmodat 306
#define __NR_ia32_faccessat 307
-#define __NR_ia32_unshare 308
+#define __NR_ia32_pselect6 308
+#define __NR_ia32_ppoll 309
+#define __NR_ia32_unshare 310
+#define __NR_ia32_epoll_pwait 311
-#define IA32_NR_syscalls 309 /* must be > than biggest syscall! */
+#define IA32_NR_syscalls 312 /* must be > than biggest syscall! */
#endif /* _ASM_X86_64_IA32_UNISTD_H_ */
--
Chuck