diff options
author | Christoph Hellwig <hch@lst.de> | 2010-03-10 18:21:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:32 -0500 |
commit | 5d0e52830e9ae09b872567f4aca3dfb5b5918079 (patch) | |
tree | 55a199575058da551ccc837ab35a1f4826a8c5b4 /arch/mn10300 | |
parent | 724ee626f38feaea215a11790e1a0cb5d83b0628 (diff) |
Add generic sys_old_select()
Add a generic implementation of the old select() syscall, which expects
its argument in a memory block and switch all architectures over to use
it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/mn10300/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/mn10300/kernel/sys_mn10300.c | 18 |
3 files changed, 2 insertions, 19 deletions
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h index c05acb95c2a9..d13a56e99bad 100644 --- a/arch/mn10300/include/asm/unistd.h +++ b/arch/mn10300/include/asm/unistd.h | |||
@@ -375,6 +375,7 @@ | |||
375 | #define __ARCH_WANT_SYS_LLSEEK | 375 | #define __ARCH_WANT_SYS_LLSEEK |
376 | #define __ARCH_WANT_SYS_NICE | 376 | #define __ARCH_WANT_SYS_NICE |
377 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | 377 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT |
378 | #define __ARCH_WANT_SYS_OLD_SELECT | ||
378 | #define __ARCH_WANT_SYS_OLDUMOUNT | 379 | #define __ARCH_WANT_SYS_OLDUMOUNT |
379 | #define __ARCH_WANT_SYS_SIGPENDING | 380 | #define __ARCH_WANT_SYS_SIGPENDING |
380 | #define __ARCH_WANT_SYS_SIGPROCMASK | 381 | #define __ARCH_WANT_SYS_SIGPROCMASK |
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index 88e3e1c3cc21..d9ed5a15c547 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S | |||
@@ -468,7 +468,7 @@ ENTRY(sys_call_table) | |||
468 | .long sys_settimeofday | 468 | .long sys_settimeofday |
469 | .long sys_getgroups16 /* 80 */ | 469 | .long sys_getgroups16 /* 80 */ |
470 | .long sys_setgroups16 | 470 | .long sys_setgroups16 |
471 | .long old_select | 471 | .long sys_old_select |
472 | .long sys_symlink | 472 | .long sys_symlink |
473 | .long sys_lstat | 473 | .long sys_lstat |
474 | .long sys_readlink /* 85 */ | 474 | .long sys_readlink /* 85 */ |
diff --git a/arch/mn10300/kernel/sys_mn10300.c b/arch/mn10300/kernel/sys_mn10300.c index 17cc6ce04e84..bef69d6daf15 100644 --- a/arch/mn10300/kernel/sys_mn10300.c +++ b/arch/mn10300/kernel/sys_mn10300.c | |||
@@ -32,24 +32,6 @@ asmlinkage long old_mmap(unsigned long addr, unsigned long len, | |||
32 | return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); | 32 | return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); |
33 | } | 33 | } |
34 | 34 | ||
35 | struct sel_arg_struct { | ||
36 | unsigned long n; | ||
37 | fd_set *inp; | ||
38 | fd_set *outp; | ||
39 | fd_set *exp; | ||
40 | struct timeval *tvp; | ||
41 | }; | ||
42 | |||
43 | asmlinkage int old_select(struct sel_arg_struct __user *arg) | ||
44 | { | ||
45 | struct sel_arg_struct a; | ||
46 | |||
47 | if (copy_from_user(&a, arg, sizeof(a))) | ||
48 | return -EFAULT; | ||
49 | /* sys_select() does the appropriate kernel locking */ | ||
50 | return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp); | ||
51 | } | ||
52 | |||
53 | /* | 35 | /* |
54 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | 36 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. |
55 | * | 37 | * |