Remove the 'nap' field from ARM's 'struct syscall_args', to bring it

in sync with (most) other architectures.  No functional changes.

Reviewed by:	manu
Tested by:	mmel
MFC after:	2 weeks
Sponsored by:	EPSRC
Differential Revision:	https://reviews.freebsd.org/D26604
This commit is contained in:
Edward Tomasz Napierala 2020-11-05 18:10:03 +00:00
parent cc3568c1d0
commit 6998d5b1c8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367394
2 changed files with 7 additions and 8 deletions

View File

@ -102,17 +102,19 @@ cpu_fetch_syscall_args(struct thread *td)
struct proc *p;
register_t *ap;
struct syscall_args *sa;
u_int nap;
int error;
nap = 4;
sa = &td->td_sa;
sa->code = td->td_frame->tf_r7;
ap = &td->td_frame->tf_r0;
if (sa->code == SYS_syscall) {
sa->code = *ap++;
sa->nap--;
nap--;
} else if (sa->code == SYS___syscall) {
sa->code = ap[_QUAD_LOWWORD];
sa->nap -= 2;
nap -= 2;
ap += 2;
}
p = td->td_proc;
@ -121,11 +123,10 @@ cpu_fetch_syscall_args(struct thread *td)
else
sa->callp = &p->p_sysent->sv_table[sa->code];
error = 0;
memcpy(sa->args, ap, sa->nap * sizeof(register_t));
if (sa->callp->sy_narg > sa->nap) {
memcpy(sa->args, ap, nap * sizeof(register_t));
if (sa->callp->sy_narg > nap) {
error = copyin((void *)td->td_frame->tf_usr_sp, sa->args +
sa->nap, (sa->callp->sy_narg - sa->nap) *
sizeof(register_t));
nap, (sa->callp->sy_narg - nap) * sizeof(register_t));
}
if (error == 0) {
td->td_retval[0] = 0;
@ -140,7 +141,6 @@ static void
syscall(struct thread *td, struct trapframe *frame)
{
td->td_sa.nap = 4;
syscallenter(td);
syscallret(td);
}

View File

@ -82,7 +82,6 @@ struct syscall_args {
u_int code;
struct sysent *callp;
register_t args[MAXARGS];
u_int nap;
} __aligned(8);
#endif /* !_MACHINE_PROC_H_ */