aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-03-26 04:37:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:57 -0500
commit88959ea968709c35e8b979ac9f5a398fa748091a (patch)
tree7d93892ec8d7b15cd810e4bcb75715c797e01ab3 /arch/x86_64/ia32
parenteb76b3fda1f7c2aa2d1523b36835048a15e5e5d2 (diff)
[PATCH] create struct compat_timex and use it everywhere
We had a copy of the compatibility version of struct timex in each 64 bit architecture. This patch just creates a global one and replaces all the usages of the old ones. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Kyle McMartin <kyle@parisc-linux.org> Acked-by: Tony Luck <tony.luck@intel.com> 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/sys_ia32.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 2b2d029f477c..b13121e451a8 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -769,30 +769,17 @@ sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, s32 count)
769 769
770/* Handle adjtimex compatibility. */ 770/* Handle adjtimex compatibility. */
771 771
772struct timex32 {
773 u32 modes;
774 s32 offset, freq, maxerror, esterror;
775 s32 status, constant, precision, tolerance;
776 struct compat_timeval time;
777 s32 tick;
778 s32 ppsfreq, jitter, shift, stabil;
779 s32 jitcnt, calcnt, errcnt, stbcnt;
780 s32 :32; s32 :32; s32 :32; s32 :32;
781 s32 :32; s32 :32; s32 :32; s32 :32;
782 s32 :32; s32 :32; s32 :32; s32 :32;
783};
784
785extern int do_adjtimex(struct timex *); 772extern int do_adjtimex(struct timex *);
786 773
787asmlinkage long 774asmlinkage long
788sys32_adjtimex(struct timex32 __user *utp) 775sys32_adjtimex(struct compat_timex __user *utp)
789{ 776{
790 struct timex txc; 777 struct timex txc;
791 int ret; 778 int ret;
792 779
793 memset(&txc, 0, sizeof(struct timex)); 780 memset(&txc, 0, sizeof(struct timex));
794 781
795 if (!access_ok(VERIFY_READ, utp, sizeof(struct timex32)) || 782 if (!access_ok(VERIFY_READ, utp, sizeof(struct compat_timex)) ||
796 __get_user(txc.modes, &utp->modes) || 783 __get_user(txc.modes, &utp->modes) ||
797 __get_user(txc.offset, &utp->offset) || 784 __get_user(txc.offset, &utp->offset) ||
798 __get_user(txc.freq, &utp->freq) || 785 __get_user(txc.freq, &utp->freq) ||
@@ -817,7 +804,7 @@ sys32_adjtimex(struct timex32 __user *utp)
817 804
818 ret = do_adjtimex(&txc); 805 ret = do_adjtimex(&txc);
819 806
820 if (!access_ok(VERIFY_WRITE, utp, sizeof(struct timex32)) || 807 if (!access_ok(VERIFY_WRITE, utp, sizeof(struct compat_timex)) ||
821 __put_user(txc.modes, &utp->modes) || 808 __put_user(txc.modes, &utp->modes) ||
822 __put_user(txc.offset, &utp->offset) || 809 __put_user(txc.offset, &utp->offset) ||
823 __put_user(txc.freq, &utp->freq) || 810 __put_user(txc.freq, &utp->freq) ||