aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-03-26 04:37:29 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:57 -0500
commit3158e9411a66fb98d495ac441c242264f31aaf3e (patch)
tree7b3bad47214c09c9dcd7ff27316c6de23f4c7cb0 /arch/x86_64/ia32
parent88959ea968709c35e8b979ac9f5a398fa748091a (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/x86_64/ia32')
-rw-r--r--arch/x86_64/ia32/ia32entry.S2
-rw-r--r--arch/x86_64/ia32/sys_ia32.c64
2 files changed, 1 insertions, 65 deletions
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index 00dee176c08e..7549a4389fbf 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -501,7 +501,7 @@ ia32_sys_call_table:
501 .quad sys_setdomainname 501 .quad sys_setdomainname
502 .quad sys_uname 502 .quad sys_uname
503 .quad sys_modify_ldt 503 .quad sys_modify_ldt
504 .quad sys32_adjtimex 504 .quad compat_sys_adjtimex
505 .quad sys32_mprotect /* 125 */ 505 .quad sys32_mprotect /* 125 */
506 .quad compat_sys_sigprocmask 506 .quad compat_sys_sigprocmask
507 .quad quiet_ni_syscall /* create_module */ 507 .quad quiet_ni_syscall /* create_module */
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index b13121e451a8..f182b20858e2 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -30,7 +30,6 @@
30#include <linux/resource.h> 30#include <linux/resource.h>
31#include <linux/times.h> 31#include <linux/times.h>
32#include <linux/utsname.h> 32#include <linux/utsname.h>
33#include <linux/timex.h>
34#include <linux/smp.h> 33#include <linux/smp.h>
35#include <linux/smp_lock.h> 34#include <linux/smp_lock.h>
36#include <linux/sem.h> 35#include <linux/sem.h>
@@ -767,69 +766,6 @@ sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, s32 count)
767 return ret; 766 return ret;
768} 767}
769 768
770/* Handle adjtimex compatibility. */
771
772extern int do_adjtimex(struct timex *);
773
774asmlinkage long
775sys32_adjtimex(struct compat_timex __user *utp)
776{
777 struct timex txc;
778 int ret;
779
780 memset(&txc, 0, sizeof(struct timex));
781
782 if (!access_ok(VERIFY_READ, utp, sizeof(struct compat_timex)) ||
783 __get_user(txc.modes, &utp->modes) ||
784 __get_user(txc.offset, &utp->offset) ||
785 __get_user(txc.freq, &utp->freq) ||
786 __get_user(txc.maxerror, &utp->maxerror) ||
787 __get_user(txc.esterror, &utp->esterror) ||
788 __get_user(txc.status, &utp->status) ||
789 __get_user(txc.constant, &utp->constant) ||
790 __get_user(txc.precision, &utp->precision) ||
791 __get_user(txc.tolerance, &utp->tolerance) ||
792 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
793 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
794 __get_user(txc.tick, &utp->tick) ||
795 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
796 __get_user(txc.jitter, &utp->jitter) ||
797 __get_user(txc.shift, &utp->shift) ||
798 __get_user(txc.stabil, &utp->stabil) ||
799 __get_user(txc.jitcnt, &utp->jitcnt) ||
800 __get_user(txc.calcnt, &utp->calcnt) ||
801 __get_user(txc.errcnt, &utp->errcnt) ||
802 __get_user(txc.stbcnt, &utp->stbcnt))
803 return -EFAULT;
804
805 ret = do_adjtimex(&txc);
806
807 if (!access_ok(VERIFY_WRITE, utp, sizeof(struct compat_timex)) ||
808 __put_user(txc.modes, &utp->modes) ||
809 __put_user(txc.offset, &utp->offset) ||
810 __put_user(txc.freq, &utp->freq) ||
811 __put_user(txc.maxerror, &utp->maxerror) ||
812 __put_user(txc.esterror, &utp->esterror) ||
813 __put_user(txc.status, &utp->status) ||
814 __put_user(txc.constant, &utp->constant) ||
815 __put_user(txc.precision, &utp->precision) ||
816 __put_user(txc.tolerance, &utp->tolerance) ||
817 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
818 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
819 __put_user(txc.tick, &utp->tick) ||
820 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
821 __put_user(txc.jitter, &utp->jitter) ||
822 __put_user(txc.shift, &utp->shift) ||
823 __put_user(txc.stabil, &utp->stabil) ||
824 __put_user(txc.jitcnt, &utp->jitcnt) ||
825 __put_user(txc.calcnt, &utp->calcnt) ||
826 __put_user(txc.errcnt, &utp->errcnt) ||
827 __put_user(txc.stbcnt, &utp->stbcnt))
828 ret = -EFAULT;
829
830 return ret;
831}
832
833asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len, 769asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len,
834 unsigned long prot, unsigned long flags, 770 unsigned long prot, unsigned long flags,
835 unsigned long fd, unsigned long pgoff) 771 unsigned long fd, unsigned long pgoff)