diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-03-26 04:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:57 -0500 |
commit | 3158e9411a66fb98d495ac441c242264f31aaf3e (patch) | |
tree | 7b3bad47214c09c9dcd7ff27316c6de23f4c7cb0 /arch/mips | |
parent | 88959ea968709c35e8b979ac9f5a398fa748091a (diff) |
[PATCH] consolidate sys32/compat_adjtimex
Create compat_sys_adjtimex and use it an all appropriate places.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/linux32.c | 61 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 |
3 files changed, 2 insertions, 63 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index f33e779796f0..3f40c37a9ee6 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/utime.h> | 30 | #include <linux/utime.h> |
31 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
32 | #include <linux/personality.h> | 32 | #include <linux/personality.h> |
33 | #include <linux/timex.h> | ||
34 | #include <linux/dnotify.h> | 33 | #include <linux/dnotify.h> |
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/binfmts.h> | 35 | #include <linux/binfmts.h> |
@@ -1157,66 +1156,6 @@ out: | |||
1157 | return err; | 1156 | return err; |
1158 | } | 1157 | } |
1159 | 1158 | ||
1160 | /* Handle adjtimex compatibility. */ | ||
1161 | |||
1162 | extern int do_adjtimex(struct timex *); | ||
1163 | |||
1164 | asmlinkage int sys32_adjtimex(struct compat_timex __user *utp) | ||
1165 | { | ||
1166 | struct timex txc; | ||
1167 | int ret; | ||
1168 | |||
1169 | memset(&txc, 0, sizeof(struct timex)); | ||
1170 | |||
1171 | if (get_user(txc.modes, &utp->modes) || | ||
1172 | __get_user(txc.offset, &utp->offset) || | ||
1173 | __get_user(txc.freq, &utp->freq) || | ||
1174 | __get_user(txc.maxerror, &utp->maxerror) || | ||
1175 | __get_user(txc.esterror, &utp->esterror) || | ||
1176 | __get_user(txc.status, &utp->status) || | ||
1177 | __get_user(txc.constant, &utp->constant) || | ||
1178 | __get_user(txc.precision, &utp->precision) || | ||
1179 | __get_user(txc.tolerance, &utp->tolerance) || | ||
1180 | __get_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
1181 | __get_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
1182 | __get_user(txc.tick, &utp->tick) || | ||
1183 | __get_user(txc.ppsfreq, &utp->ppsfreq) || | ||
1184 | __get_user(txc.jitter, &utp->jitter) || | ||
1185 | __get_user(txc.shift, &utp->shift) || | ||
1186 | __get_user(txc.stabil, &utp->stabil) || | ||
1187 | __get_user(txc.jitcnt, &utp->jitcnt) || | ||
1188 | __get_user(txc.calcnt, &utp->calcnt) || | ||
1189 | __get_user(txc.errcnt, &utp->errcnt) || | ||
1190 | __get_user(txc.stbcnt, &utp->stbcnt)) | ||
1191 | return -EFAULT; | ||
1192 | |||
1193 | ret = do_adjtimex(&txc); | ||
1194 | |||
1195 | if (put_user(txc.modes, &utp->modes) || | ||
1196 | __put_user(txc.offset, &utp->offset) || | ||
1197 | __put_user(txc.freq, &utp->freq) || | ||
1198 | __put_user(txc.maxerror, &utp->maxerror) || | ||
1199 | __put_user(txc.esterror, &utp->esterror) || | ||
1200 | __put_user(txc.status, &utp->status) || | ||
1201 | __put_user(txc.constant, &utp->constant) || | ||
1202 | __put_user(txc.precision, &utp->precision) || | ||
1203 | __put_user(txc.tolerance, &utp->tolerance) || | ||
1204 | __put_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
1205 | __put_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
1206 | __put_user(txc.tick, &utp->tick) || | ||
1207 | __put_user(txc.ppsfreq, &utp->ppsfreq) || | ||
1208 | __put_user(txc.jitter, &utp->jitter) || | ||
1209 | __put_user(txc.shift, &utp->shift) || | ||
1210 | __put_user(txc.stabil, &utp->stabil) || | ||
1211 | __put_user(txc.jitcnt, &utp->jitcnt) || | ||
1212 | __put_user(txc.calcnt, &utp->calcnt) || | ||
1213 | __put_user(txc.errcnt, &utp->errcnt) || | ||
1214 | __put_user(txc.stbcnt, &utp->stbcnt)) | ||
1215 | ret = -EFAULT; | ||
1216 | |||
1217 | return ret; | ||
1218 | } | ||
1219 | |||
1220 | asmlinkage int sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, | 1159 | asmlinkage int sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, |
1221 | s32 count) | 1160 | s32 count) |
1222 | { | 1161 | { |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 02c8267e45e7..05a2c0567dae 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -273,7 +273,7 @@ EXPORT(sysn32_call_table) | |||
273 | PTR sys_pivot_root | 273 | PTR sys_pivot_root |
274 | PTR sys32_sysctl | 274 | PTR sys32_sysctl |
275 | PTR sys_prctl | 275 | PTR sys_prctl |
276 | PTR sys32_adjtimex | 276 | PTR compat_sys_adjtimex |
277 | PTR compat_sys_setrlimit /* 6155 */ | 277 | PTR compat_sys_setrlimit /* 6155 */ |
278 | PTR sys_chroot | 278 | PTR sys_chroot |
279 | PTR sys_sync | 279 | PTR sys_sync |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 797e0d874889..19c4ca481b02 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -328,7 +328,7 @@ sys_call_table: | |||
328 | PTR sys_setdomainname | 328 | PTR sys_setdomainname |
329 | PTR sys32_newuname | 329 | PTR sys32_newuname |
330 | PTR sys_ni_syscall /* sys_modify_ldt */ | 330 | PTR sys_ni_syscall /* sys_modify_ldt */ |
331 | PTR sys32_adjtimex | 331 | PTR compat_sys_adjtimex |
332 | PTR sys_mprotect /* 4125 */ | 332 | PTR sys_mprotect /* 4125 */ |
333 | PTR compat_sys_sigprocmask | 333 | PTR compat_sys_sigprocmask |
334 | PTR sys_ni_syscall /* was creat_module */ | 334 | PTR sys_ni_syscall /* was creat_module */ |