Remove yet another useless assignment, adding a KASSERT just in case.

Reviewed by:	kp
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26698
This commit is contained in:
Edward Tomasz Napierala 2020-10-08 11:04:32 +00:00
parent d6dbbdea20
commit 5319fa1b3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366534

View file

@ -158,15 +158,12 @@ dump_regs(struct trapframe *frame)
}
static void
ecall_handler(struct trapframe *frame)
ecall_handler(void)
{
struct thread *td;
td = curthread;
KASSERT(td->td_frame == frame,
("%s: td_frame %p != frame %p", __func__, td->td_frame, frame));
syscallenter(td);
syscallret(td);
}
@ -324,9 +321,11 @@ do_trap_user(struct trapframe *frame)
struct pcb *pcb;
td = curthread;
td->td_frame = frame;
pcb = td->td_pcb;
KASSERT(td->td_frame == frame,
("%s: td_frame %p != frame %p", __func__, td->td_frame, frame));
/* Ensure we came from usermode, interrupts disabled */
KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == 0,
("Came from U mode with interrupts enabled"));
@ -357,7 +356,7 @@ do_trap_user(struct trapframe *frame)
break;
case EXCP_USER_ECALL:
frame->tf_sepc += 4; /* Next instruction */
ecall_handler(frame);
ecall_handler();
break;
case EXCP_ILLEGAL_INSTRUCTION:
#ifdef FPE