aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-01-09 23:52:08 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:32 -0500
commit3a0f69d59ba41fbcad6a17b6e8aab02bf45e20ce (patch)
tree8ba042dda77490f574f2c46bd038fd99a7f977e4 /arch/sparc64
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/sparc64')
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c36
-rw-r--r--arch/sparc64/kernel/systbls.S2
2 files changed, 1 insertions, 37 deletions
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 7f6239ed2521..de342ee3116b 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -1120,39 +1120,3 @@ long sys32_lookup_dcookie(unsigned long cookie_high,
1120 return sys_lookup_dcookie((cookie_high << 32) | cookie_low, 1120 return sys_lookup_dcookie((cookie_high << 32) | cookie_low,
1121 buf, len); 1121 buf, len);
1122} 1122}
1123
1124extern asmlinkage long
1125sys_timer_create(clockid_t which_clock,
1126 struct sigevent __user *timer_event_spec,
1127 timer_t __user *created_timer_id);
1128
1129long
1130sys32_timer_create(u32 clock, struct compat_sigevent __user *se32,
1131 timer_t __user *timer_id)
1132{
1133 struct sigevent se;
1134 mm_segment_t oldfs;
1135 timer_t t;
1136 long err;
1137
1138 if (se32 == NULL)
1139 return sys_timer_create(clock, NULL, timer_id);
1140
1141 if (get_compat_sigevent(&se, se32))
1142 return -EFAULT;
1143
1144 if (!access_ok(VERIFY_WRITE,timer_id,sizeof(timer_t)))
1145 return -EFAULT;
1146
1147 oldfs = get_fs();
1148 set_fs(KERNEL_DS);
1149 err = sys_timer_create(clock,
1150 (struct sigevent __user *) &se,
1151 (timer_t __user *) &t);
1152 set_fs(oldfs);
1153
1154 if (!err)
1155 err = __put_user (t, timer_id);
1156
1157 return err;
1158}
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 53eaf2345fe9..37e9acc9e587 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -73,7 +73,7 @@ sys_call_table32:
73/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl 73/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
74 .word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep 74 .word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
75/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun 75/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
76 .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy 76 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
77/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink 77/*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
78 .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid 78 .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
79/*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl 79/*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl