aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel
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/parisc/kernel
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/parisc/kernel')
-rw-r--r--arch/parisc/kernel/sys_parisc32.c29
-rw-r--r--arch/parisc/kernel/syscall_table.S2
2 files changed, 1 insertions, 30 deletions
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index ca1d8dbbadf3..d286f68a3d3a 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -21,7 +21,6 @@
21#include <linux/times.h> 21#include <linux/times.h>
22#include <linux/utsname.h> 22#include <linux/utsname.h>
23#include <linux/time.h> 23#include <linux/time.h>
24#include <linux/timex.h>
25#include <linux/smp.h> 24#include <linux/smp.h>
26#include <linux/smp_lock.h> 25#include <linux/smp_lock.h>
27#include <linux/sem.h> 26#include <linux/sem.h>
@@ -567,34 +566,6 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off
567} 566}
568 567
569 568
570asmlinkage long sys32_adjtimex(struct compat_timex __user *txc_p32)
571{
572 struct timex txc;
573 struct compat_timex t32;
574 int ret;
575 extern int do_adjtimex(struct timex *txc);
576
577 if(copy_from_user(&t32, txc_p32, sizeof(struct compat_timex)))
578 return -EFAULT;
579#undef CP
580#define CP(x) txc.x = t32.x
581 CP(modes); CP(offset); CP(freq); CP(maxerror); CP(esterror);
582 CP(status); CP(constant); CP(precision); CP(tolerance);
583 CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter);
584 CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt);
585 CP(stbcnt);
586 ret = do_adjtimex(&txc);
587#undef CP
588#define CP(x) t32.x = txc.x
589 CP(modes); CP(offset); CP(freq); CP(maxerror); CP(esterror);
590 CP(status); CP(constant); CP(precision); CP(tolerance);
591 CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter);
592 CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt);
593 CP(stbcnt);
594 return copy_to_user(txc_p32, &t32, sizeof(struct compat_timex)) ? -EFAULT : ret;
595}
596
597
598struct sysinfo32 { 569struct sysinfo32 {
599 s32 uptime; 570 s32 uptime;
600 u32 loads[3]; 571 u32 loads[3];
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 71011eadb872..89b6c56ea0a8 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -207,7 +207,7 @@
207 /* struct sockaddr... */ 207 /* struct sockaddr... */
208 ENTRY_SAME(recvfrom) 208 ENTRY_SAME(recvfrom)
209 /* struct timex contains longs */ 209 /* struct timex contains longs */
210 ENTRY_DIFF(adjtimex) 210 ENTRY_COMP(adjtimex)
211 ENTRY_SAME(mprotect) /* 125 */ 211 ENTRY_SAME(mprotect) /* 125 */
212 /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */ 212 /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
213 ENTRY_COMP(sigprocmask) 213 ENTRY_COMP(sigprocmask)