aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-09 20:52:08 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 08:01:32 -0800
commit3a0f69d59ba41fbcad6a17b6e8aab02bf45e20ce (patch)
tree8ba042dda77490f574f2c46bd038fd99a7f977e4 /arch/powerpc
parentf042e0f80b0a9f5bb57c36d60a2798de6ca943b2 (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')
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c32
-rw-r--r--arch/powerpc/kernel/systbl.S2
2 files changed, 1 insertions, 33 deletions
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 9c921d1c408..0ee44be4ab7 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,
advice);
}
-long ppc32_timer_create(clockid_t clock,
- struct compat_sigevent __user *ev32,
- timer_t __user *timer_id)
-{
- sigevent_t event;
- timer_t t;
- long err;
- mm_segment_t savefs;
-
- if (ev32 == NULL)
- return sys_timer_create(clock, NULL, timer_id);
-
- if (get_compat_sigevent(&event, ev32))
- return -EFAULT;
-
- if (!access_ok(VERIFY_WRITE, timer_id, sizeof(timer_t)))
- return -EFAULT;
-
- savefs = get_fs();
- set_fs(KERNEL_DS);
- /* The __user pointer casts are valid due to the set_fs() */
- err = sys_timer_create(clock,
- (sigevent_t __user *) &event,
- (timer_t __user *) &t);
- set_fs(savefs);
-
- if (err == 0)
- err = __put_user(t, timer_id);
-
- return err;
-}
-
asmlinkage long compat_sys_add_key(const char __user *_type,
const char __user *_description,
const void __user *_payload,
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 65463a1076e..dd2ab85e351 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -281,7 +281,7 @@ SYSCALL(epoll_create)
SYSCALL(epoll_ctl)
SYSCALL(epoll_wait)
SYSCALL(remap_file_pages)
-SYSX(sys_timer_create,ppc32_timer_create,sys_timer_create)
+SYSX(sys_timer_create,compat_sys_timer_create,sys_timer_create)
COMPAT_SYS(timer_settime)
COMPAT_SYS(timer_gettime)
SYSCALL(timer_getoverrun)