diff options
Diffstat (limited to 'arch/parisc/kernel/sys_parisc32.c')
-rw-r--r-- | arch/parisc/kernel/sys_parisc32.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 2c3af17e049c..0838155b7a88 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -179,64 +179,6 @@ asmlinkage long sys32_sched_rr_get_interval(pid_t pid, | |||
179 | return ret; | 179 | return ret; |
180 | } | 180 | } |
181 | 181 | ||
182 | static int | ||
183 | put_compat_timeval(struct compat_timeval __user *u, struct timeval *t) | ||
184 | { | ||
185 | struct compat_timeval t32; | ||
186 | t32.tv_sec = t->tv_sec; | ||
187 | t32.tv_usec = t->tv_usec; | ||
188 | return copy_to_user(u, &t32, sizeof t32); | ||
189 | } | ||
190 | |||
191 | static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i) | ||
192 | { | ||
193 | long usec; | ||
194 | |||
195 | if (__get_user(o->tv_sec, &i->tv_sec)) | ||
196 | return -EFAULT; | ||
197 | if (__get_user(usec, &i->tv_usec)) | ||
198 | return -EFAULT; | ||
199 | o->tv_nsec = usec * 1000; | ||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | asmlinkage int | ||
204 | sys32_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) | ||
205 | { | ||
206 | extern void do_gettimeofday(struct timeval *tv); | ||
207 | |||
208 | if (tv) { | ||
209 | struct timeval ktv; | ||
210 | do_gettimeofday(&ktv); | ||
211 | if (put_compat_timeval(tv, &ktv)) | ||
212 | return -EFAULT; | ||
213 | } | ||
214 | if (tz) { | ||
215 | extern struct timezone sys_tz; | ||
216 | if (copy_to_user(tz, &sys_tz, sizeof(sys_tz))) | ||
217 | return -EFAULT; | ||
218 | } | ||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | asmlinkage | ||
223 | int sys32_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) | ||
224 | { | ||
225 | struct timespec kts; | ||
226 | struct timezone ktz; | ||
227 | |||
228 | if (tv) { | ||
229 | if (get_ts32(&kts, tv)) | ||
230 | return -EFAULT; | ||
231 | } | ||
232 | if (tz) { | ||
233 | if (copy_from_user(&ktz, tz, sizeof(ktz))) | ||
234 | return -EFAULT; | ||
235 | } | ||
236 | |||
237 | return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); | ||
238 | } | ||
239 | |||
240 | /*** copied from mips64 ***/ | 182 | /*** copied from mips64 ***/ |
241 | /* | 183 | /* |
242 | * Ooo, nasty. We need here to frob 32-bit unsigned longs to | 184 | * Ooo, nasty. We need here to frob 32-bit unsigned longs to |