Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148974514
D26698.id77970.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26698.id77970.diff
View Options
Index: sys/riscv/riscv/trap.c
===================================================================
--- sys/riscv/riscv/trap.c
+++ sys/riscv/riscv/trap.c
@@ -158,15 +158,12 @@
}
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 @@
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 @@
break;
case EXCP_USER_ECALL:
frame->tf_sepc += 4; /* Next instruction */
- ecall_handler(frame);
+ ecall_handler();
break;
case EXCP_ILLEGAL_INSTRUCTION:
#ifdef FPE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 11:06 AM (8 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30120007
Default Alt Text
D26698.id77970.diff (1 KB)
Attached To
Mode
D26698: Remove yet another useless assignment
Attached
Detach File
Event Timeline
Log In to Comment