diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-03-26 04:37:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:57 -0500 |
commit | 88959ea968709c35e8b979ac9f5a398fa748091a (patch) | |
tree | 7d93892ec8d7b15cd810e4bcb75715c797e01ab3 /arch/parisc | |
parent | eb76b3fda1f7c2aa2d1523b36835048a15e5e5d2 (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/parisc')
-rw-r--r-- | arch/parisc/kernel/sys_parisc32.c | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 613569018410..ca1d8dbbadf3 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -567,43 +567,14 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off | |||
567 | } | 567 | } |
568 | 568 | ||
569 | 569 | ||
570 | struct timex32 { | 570 | asmlinkage long sys32_adjtimex(struct compat_timex __user *txc_p32) |
571 | unsigned int modes; /* mode selector */ | ||
572 | int offset; /* time offset (usec) */ | ||
573 | int freq; /* frequency offset (scaled ppm) */ | ||
574 | int maxerror; /* maximum error (usec) */ | ||
575 | int esterror; /* estimated error (usec) */ | ||
576 | int status; /* clock command/status */ | ||
577 | int constant; /* pll time constant */ | ||
578 | int precision; /* clock precision (usec) (read only) */ | ||
579 | int tolerance; /* clock frequency tolerance (ppm) | ||
580 | * (read only) | ||
581 | */ | ||
582 | struct compat_timeval time; /* (read only) */ | ||
583 | int tick; /* (modified) usecs between clock ticks */ | ||
584 | |||
585 | int ppsfreq; /* pps frequency (scaled ppm) (ro) */ | ||
586 | int jitter; /* pps jitter (us) (ro) */ | ||
587 | int shift; /* interval duration (s) (shift) (ro) */ | ||
588 | int stabil; /* pps stability (scaled ppm) (ro) */ | ||
589 | int jitcnt; /* jitter limit exceeded (ro) */ | ||
590 | int calcnt; /* calibration intervals (ro) */ | ||
591 | int errcnt; /* calibration errors (ro) */ | ||
592 | int stbcnt; /* stability limit exceeded (ro) */ | ||
593 | |||
594 | int :32; int :32; int :32; int :32; | ||
595 | int :32; int :32; int :32; int :32; | ||
596 | int :32; int :32; int :32; int :32; | ||
597 | }; | ||
598 | |||
599 | asmlinkage long sys32_adjtimex(struct timex32 __user *txc_p32) | ||
600 | { | 571 | { |
601 | struct timex txc; | 572 | struct timex txc; |
602 | struct timex32 t32; | 573 | struct compat_timex t32; |
603 | int ret; | 574 | int ret; |
604 | extern int do_adjtimex(struct timex *txc); | 575 | extern int do_adjtimex(struct timex *txc); |
605 | 576 | ||
606 | if(copy_from_user(&t32, txc_p32, sizeof(struct timex32))) | 577 | if(copy_from_user(&t32, txc_p32, sizeof(struct compat_timex))) |
607 | return -EFAULT; | 578 | return -EFAULT; |
608 | #undef CP | 579 | #undef CP |
609 | #define CP(x) txc.x = t32.x | 580 | #define CP(x) txc.x = t32.x |
@@ -620,7 +591,7 @@ asmlinkage long sys32_adjtimex(struct timex32 __user *txc_p32) | |||
620 | CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter); | 591 | CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter); |
621 | CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt); | 592 | CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt); |
622 | CP(stbcnt); | 593 | CP(stbcnt); |
623 | return copy_to_user(txc_p32, &t32, sizeof(struct timex32)) ? -EFAULT : ret; | 594 | return copy_to_user(txc_p32, &t32, sizeof(struct compat_timex)) ? -EFAULT : ret; |
624 | } | 595 | } |
625 | 596 | ||
626 | 597 | ||