diff options
author | Christoph Hellwig <hch@lst.de> | 2006-01-09 23:52:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:32 -0500 |
commit | 3a0f69d59ba41fbcad6a17b6e8aab02bf45e20ce (patch) | |
tree | 8ba042dda77490f574f2c46bd038fd99a7f977e4 /arch/powerpc/kernel/sys_ppc32.c | |
parent | f042e0f80b0a9f5bb57c36d60a2798de6ca943b2 (diff) |
[PATCH] common compat_sys_timer_create
The comment in compat.c is wrong, every architecture provides a
get_compat_sigevent() for the IPC compat code already.
This basically moves the x86_64 version to common code and removes all the
others.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/kernel/sys_ppc32.c')
-rw-r--r-- | arch/powerpc/kernel/sys_ppc32.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 9c921d1c4084..0ee44be4ab73 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -956,38 +956,6 @@ long ppc32_fadvise64(int fd, u32 unused, u32 offset_high, u32 offset_low, | |||
956 | advice); | 956 | advice); |
957 | } | 957 | } |
958 | 958 | ||
959 | long ppc32_timer_create(clockid_t clock, | ||
960 | struct compat_sigevent __user *ev32, | ||
961 | timer_t __user *timer_id) | ||
962 | { | ||
963 | sigevent_t event; | ||
964 | timer_t t; | ||
965 | long err; | ||
966 | mm_segment_t savefs; | ||
967 | |||
968 | if (ev32 == NULL) | ||
969 | return sys_timer_create(clock, NULL, timer_id); | ||
970 | |||
971 | if (get_compat_sigevent(&event, ev32)) | ||
972 | return -EFAULT; | ||
973 | |||
974 | if (!access_ok(VERIFY_WRITE, timer_id, sizeof(timer_t))) | ||
975 | return -EFAULT; | ||
976 | |||
977 | savefs = get_fs(); | ||
978 | set_fs(KERNEL_DS); | ||
979 | /* The __user pointer casts are valid due to the set_fs() */ | ||
980 | err = sys_timer_create(clock, | ||
981 | (sigevent_t __user *) &event, | ||
982 | (timer_t __user *) &t); | ||
983 | set_fs(savefs); | ||
984 | |||
985 | if (err == 0) | ||
986 | err = __put_user(t, timer_id); | ||
987 | |||
988 | return err; | ||
989 | } | ||
990 | |||
991 | asmlinkage long compat_sys_add_key(const char __user *_type, | 959 | asmlinkage long compat_sys_add_key(const char __user *_type, |
992 | const char __user *_description, | 960 | const char __user *_description, |
993 | const void __user *_payload, | 961 | const void __user *_payload, |