Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166820157
D26671.id77880.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
D26671.id77880.diff
View Options
Index: sys/riscv/riscv/exception.S
===================================================================
--- sys/riscv/riscv/exception.S
+++ sys/riscv/riscv/exception.S
@@ -40,12 +40,12 @@
#include <machine/trap.h>
#include <machine/riscvreg.h>
-.macro save_registers el
+.macro save_registers mode
addi sp, sp, -(TF_SIZE)
sd ra, (TF_RA)(sp)
-.if \el == 0 /* We came from userspace. */
+.if \mode == 0 /* We came from userspace. */
sd gp, (TF_GP)(sp)
.option push
.option norelax
@@ -88,7 +88,7 @@
sd a6, (TF_A + 6 * 8)(sp)
sd a7, (TF_A + 7 * 8)(sp)
-.if \el == 1
+.if \mode == 1
/* Store kernel sp */
li t1, TF_SIZE
add t0, sp, t1
@@ -110,9 +110,9 @@
sd t0, (TF_SCAUSE)(sp)
.endm
-.macro load_registers el
+.macro load_registers mode
ld t0, (TF_SSTATUS)(sp)
-.if \el == 0
+.if \mode == 0
/* Ensure user interrupts will be enabled on eret */
li t1, SSTATUS_SPIE
or t0, t0, t1
@@ -130,7 +130,7 @@
ld t0, (TF_SEPC)(sp)
csrw sepc, t0
-.if \el == 0
+.if \mode == 0
/* We go to userspace. Load user sp */
ld t0, (TF_SP)(sp)
csrw sscratch, t0
Index: sys/riscv/riscv/trap.c
===================================================================
--- sys/riscv/riscv/trap.c
+++ sys/riscv/riscv/trap.c
@@ -158,7 +158,7 @@
}
static void
-svc_handler(struct trapframe *frame)
+ecall_handler(struct trapframe *frame)
{
struct thread *td;
@@ -355,7 +355,7 @@
break;
case EXCP_USER_ECALL:
frame->tf_sepc += 4; /* Next instruction */
- svc_handler(frame);
+ ecall_handler(frame);
break;
case EXCP_ILLEGAL_INSTRUCTION:
#ifdef FPE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 17, 8:57 PM (9 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36871167
Default Alt Text
D26671.id77880.diff (1 KB)
Attached To
Mode
D26671: riscv: De-Arm a couple of names
Attached
Detach File
Event Timeline
Log In to Comment