aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sys_ppc32.c
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/powerpc/kernel/sys_ppc32.c
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/powerpc/kernel/sys_ppc32.c')
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index d9867f583c68..ec274e688816 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -24,7 +24,6 @@
24#include <linux/resource.h> 24#include <linux/resource.h>
25#include <linux/times.h> 25#include <linux/times.h>
26#include <linux/utsname.h> 26#include <linux/utsname.h>
27#include <linux/timex.h>
28#include <linux/smp.h> 27#include <linux/smp.h>
29#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
30#include <linux/sem.h> 29#include <linux/sem.h>
@@ -161,65 +160,6 @@ asmlinkage long compat_sys_sysfs(u32 option, u32 arg1, u32 arg2)
161 return sys_sysfs((int)option, arg1, arg2); 160 return sys_sysfs((int)option, arg1, arg2);
162} 161}
163 162
164/* Handle adjtimex compatibility. */
165extern int do_adjtimex(struct timex *);
166
167asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp)
168{
169 struct timex txc;
170 int ret;
171
172 memset(&txc, 0, sizeof(struct timex));
173
174 if(get_user(txc.modes, &utp->modes) ||
175 __get_user(txc.offset, &utp->offset) ||
176 __get_user(txc.freq, &utp->freq) ||
177 __get_user(txc.maxerror, &utp->maxerror) ||
178 __get_user(txc.esterror, &utp->esterror) ||
179 __get_user(txc.status, &utp->status) ||
180 __get_user(txc.constant, &utp->constant) ||
181 __get_user(txc.precision, &utp->precision) ||
182 __get_user(txc.tolerance, &utp->tolerance) ||
183 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
184 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
185 __get_user(txc.tick, &utp->tick) ||
186 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
187 __get_user(txc.jitter, &utp->jitter) ||
188 __get_user(txc.shift, &utp->shift) ||
189 __get_user(txc.stabil, &utp->stabil) ||
190 __get_user(txc.jitcnt, &utp->jitcnt) ||
191 __get_user(txc.calcnt, &utp->calcnt) ||
192 __get_user(txc.errcnt, &utp->errcnt) ||
193 __get_user(txc.stbcnt, &utp->stbcnt))
194 return -EFAULT;
195
196 ret = do_adjtimex(&txc);
197
198 if(put_user(txc.modes, &utp->modes) ||
199 __put_user(txc.offset, &utp->offset) ||
200 __put_user(txc.freq, &utp->freq) ||
201 __put_user(txc.maxerror, &utp->maxerror) ||
202 __put_user(txc.esterror, &utp->esterror) ||
203 __put_user(txc.status, &utp->status) ||
204 __put_user(txc.constant, &utp->constant) ||
205 __put_user(txc.precision, &utp->precision) ||
206 __put_user(txc.tolerance, &utp->tolerance) ||
207 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
208 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
209 __put_user(txc.tick, &utp->tick) ||
210 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
211 __put_user(txc.jitter, &utp->jitter) ||
212 __put_user(txc.shift, &utp->shift) ||
213 __put_user(txc.stabil, &utp->stabil) ||
214 __put_user(txc.jitcnt, &utp->jitcnt) ||
215 __put_user(txc.calcnt, &utp->calcnt) ||
216 __put_user(txc.errcnt, &utp->errcnt) ||
217 __put_user(txc.stbcnt, &utp->stbcnt))
218 ret = -EFAULT;
219
220 return ret;
221}
222
223asmlinkage long compat_sys_pause(void) 163asmlinkage long compat_sys_pause(void)
224{ 164{
225 current->state = TASK_INTERRUPTIBLE; 165 current->state = TASK_INTERRUPTIBLE;