Date: Fri, 6 Nov 2020 19:19:52 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367429 - in head/sys/mips: include mips Message-ID: <202011061919.0A6JJqOw094190@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Fri Nov 6 19:19:51 2020 New Revision: 367429 URL: https://svnweb.freebsd.org/changeset/base/367429 Log: Remove 'struct trapframe' pointer from mips64's 'struct syscall_args'. While here, use MAXARGS. This brings its 'struct syscall_args' in sync with most other architectures. Reviewed by: arichardson, brooks MFC after: 2 weeks Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D26619 Modified: head/sys/mips/include/proc.h head/sys/mips/mips/trap.c Modified: head/sys/mips/include/proc.h ============================================================================== --- head/sys/mips/include/proc.h Fri Nov 6 19:04:20 2020 (r367428) +++ head/sys/mips/include/proc.h Fri Nov 6 19:19:51 2020 (r367429) @@ -81,11 +81,11 @@ struct mdproc { size_t md_tls_tcb_offset; /* TCB offset */ }; +#define MAXARGS 8 struct syscall_args { u_int code; struct sysent *callp; - register_t args[8]; - struct trapframe *trapframe; + register_t args[MAXARGS]; }; #ifdef __mips_n64 Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Fri Nov 6 19:04:20 2020 (r367428) +++ head/sys/mips/mips/trap.c Fri Nov 6 19:19:51 2020 (r367429) @@ -349,9 +349,9 @@ cpu_fetch_syscall_args(struct thread *td) bzero(sa->args, sizeof(sa->args)); /* compute next PC after syscall instruction */ - td->td_pcb->pcb_tpc = sa->trapframe->pc; /* Remember if restart */ - if (DELAYBRANCH(sa->trapframe->cause)) /* Check BD bit */ - locr0->pc = MipsEmulateBranch(locr0, sa->trapframe->pc, 0, 0); + td->td_pcb->pcb_tpc = locr0->pc; /* Remember if restart */ + if (DELAYBRANCH(locr0->cause)) /* Check BD bit */ + locr0->pc = MipsEmulateBranch(locr0, locr0->pc, 0, 0); else locr0->pc += sizeof(int); sa->code = locr0->v0; @@ -781,7 +781,6 @@ dofault: case T_SYSCALL + T_USER: { - td->td_sa.trapframe = trapframe; syscallenter(td); #if !defined(SMP) && (defined(DDB) || defined(DEBUG))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011061919.0A6JJqOw094190>