diff options
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia32/ia32_trap.c | 3 | ||||
-rw-r--r-- | sys/ia64/ia64/trap.c | 8 | ||||
-rw-r--r-- | sys/ia64/include/proc.h | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/ia64/ia32/ia32_trap.c b/sys/ia64/ia32/ia32_trap.c index 9c7f08d..57f4791 100644 --- a/sys/ia64/ia32/ia32_trap.c +++ b/sys/ia64/ia32/ia32_trap.c @@ -132,10 +132,11 @@ ia32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) error = copyin(params, (caddr_t)args, sa->narg * sizeof(int)); else error = 0; + sa->args = &sa->args32[0]; if (error == 0) { for (i = 0; i < sa->narg; i++) - sa->args[i] = args[i]; + sa->args32[i] = args[i]; td->td_retval[0] = 0; td->td_retval[1] = tf->tf_scratch.gr10; /* edx */ } diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index 6ce56b7..f6db8c9 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -902,13 +902,12 @@ cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { struct proc *p; struct trapframe *tf; - register_t *args; p = td->td_proc; tf = td->td_frame; sa->code = tf->tf_scratch.gr15; - args = &tf->tf_scratch.gr16; + sa->args = &tf->tf_scratch.gr16; /* * syscall() and __syscall() are handled the same on @@ -918,8 +917,8 @@ cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) /* * Code is first argument, followed by actual args. */ - sa->code = args[0]; - args++; + sa->code = sa->args[0]; + sa->args++; } if (p->p_sysent->sv_mask) @@ -929,7 +928,6 @@ cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; - bcopy(args, sa->args, sa->narg * sizeof(sa->args[0])); td->td_retval[0] = 0; td->td_retval[1] = 0; diff --git a/sys/ia64/include/proc.h b/sys/ia64/include/proc.h index 574be36..8818b9d 100644 --- a/sys/ia64/include/proc.h +++ b/sys/ia64/include/proc.h @@ -45,7 +45,8 @@ struct mdproc { struct syscall_args { u_int code; struct sysent *callp; - register_t args[8]; + register_t *args; + register_t args32[8]; int narg; }; #define HAVE_SYSCALL_ARGS_DEF 1 |