aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/ia32/sys_ia32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/ia32/sys_ia32.c')
-rw-r--r--arch/ia64/ia32/sys_ia32.c89
1 files changed, 1 insertions, 88 deletions
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 70dba1f0e2ee..5366b3b23d09 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -25,7 +25,6 @@
25#include <linux/resource.h> 25#include <linux/resource.h>
26#include <linux/times.h> 26#include <linux/times.h>
27#include <linux/utsname.h> 27#include <linux/utsname.h>
28#include <linux/timex.h>
29#include <linux/smp.h> 28#include <linux/smp.h>
30#include <linux/smp_lock.h> 29#include <linux/smp_lock.h>
31#include <linux/sem.h> 30#include <linux/sem.h>
@@ -1166,19 +1165,7 @@ put_tv32 (struct compat_timeval __user *o, struct timeval *i)
1166asmlinkage unsigned long 1165asmlinkage unsigned long
1167sys32_alarm (unsigned int seconds) 1166sys32_alarm (unsigned int seconds)
1168{ 1167{
1169 struct itimerval it_new, it_old; 1168 return alarm_setitimer(seconds);
1170 unsigned int oldalarm;
1171
1172 it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0;
1173 it_new.it_value.tv_sec = seconds;
1174 it_new.it_value.tv_usec = 0;
1175 do_setitimer(ITIMER_REAL, &it_new, &it_old);
1176 oldalarm = it_old.it_value.tv_sec;
1177 /* ehhh.. We can't return 0 if we have an alarm pending.. */
1178 /* And we'd better return too much than too little anyway */
1179 if (it_old.it_value.tv_usec)
1180 oldalarm++;
1181 return oldalarm;
1182} 1169}
1183 1170
1184/* Translations due to time_t size differences. Which affects all 1171/* Translations due to time_t size differences. Which affects all
@@ -2603,78 +2590,4 @@ sys32_setresgid(compat_gid_t rgid, compat_gid_t egid,
2603 ssgid = (sgid == (compat_gid_t)-1) ? ((gid_t)-1) : ((gid_t)sgid); 2590 ssgid = (sgid == (compat_gid_t)-1) ? ((gid_t)-1) : ((gid_t)sgid);
2604 return sys_setresgid(srgid, segid, ssgid); 2591 return sys_setresgid(srgid, segid, ssgid);
2605} 2592}
2606
2607/* Handle adjtimex compatibility. */
2608
2609struct timex32 {
2610 u32 modes;
2611 s32 offset, freq, maxerror, esterror;
2612 s32 status, constant, precision, tolerance;
2613 struct compat_timeval time;
2614 s32 tick;
2615 s32 ppsfreq, jitter, shift, stabil;
2616 s32 jitcnt, calcnt, errcnt, stbcnt;
2617 s32 :32; s32 :32; s32 :32; s32 :32;
2618 s32 :32; s32 :32; s32 :32; s32 :32;
2619 s32 :32; s32 :32; s32 :32; s32 :32;
2620};
2621
2622extern int do_adjtimex(struct timex *);
2623
2624asmlinkage long
2625sys32_adjtimex(struct timex32 *utp)
2626{
2627 struct timex txc;
2628 int ret;
2629
2630 memset(&txc, 0, sizeof(struct timex));
2631
2632 if(get_user(txc.modes, &utp->modes) ||
2633 __get_user(txc.offset, &utp->offset) ||
2634 __get_user(txc.freq, &utp->freq) ||
2635 __get_user(txc.maxerror, &utp->maxerror) ||
2636 __get_user(txc.esterror, &utp->esterror) ||
2637 __get_user(txc.status, &utp->status) ||
2638 __get_user(txc.constant, &utp->constant) ||
2639 __get_user(txc.precision, &utp->precision) ||
2640 __get_user(txc.tolerance, &utp->tolerance) ||
2641 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
2642 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
2643 __get_user(txc.tick, &utp->tick) ||
2644 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
2645 __get_user(txc.jitter, &utp->jitter) ||
2646 __get_user(txc.shift, &utp->shift) ||
2647 __get_user(txc.stabil, &utp->stabil) ||
2648 __get_user(txc.jitcnt, &utp->jitcnt) ||
2649 __get_user(txc.calcnt, &utp->calcnt) ||
2650 __get_user(txc.errcnt, &utp->errcnt) ||
2651 __get_user(txc.stbcnt, &utp->stbcnt))
2652 return -EFAULT;
2653
2654 ret = do_adjtimex(&txc);
2655
2656 if(put_user(txc.modes, &utp->modes) ||
2657 __put_user(txc.offset, &utp->offset) ||
2658 __put_user(txc.freq, &utp->freq) ||
2659 __put_user(txc.maxerror, &utp->maxerror) ||
2660 __put_user(txc.esterror, &utp->esterror) ||
2661 __put_user(txc.status, &utp->status) ||
2662 __put_user(txc.constant, &utp->constant) ||
2663 __put_user(txc.precision, &utp->precision) ||
2664 __put_user(txc.tolerance, &utp->tolerance) ||
2665 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
2666 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
2667 __put_user(txc.tick, &utp->tick) ||
2668 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
2669 __put_user(txc.jitter, &utp->jitter) ||
2670 __put_user(txc.shift, &utp->shift) ||
2671 __put_user(txc.stabil, &utp->stabil) ||
2672 __put_user(txc.jitcnt, &utp->jitcnt) ||
2673 __put_user(txc.calcnt, &utp->calcnt) ||
2674 __put_user(txc.errcnt, &utp->errcnt) ||
2675 __put_user(txc.stbcnt, &utp->stbcnt))
2676 ret = -EFAULT;
2677
2678 return ret;
2679}
2680#endif /* NOTYET */ 2593#endif /* NOTYET */