projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834cd6b
)
Use user stack in supervisor mode
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 13 Dec 2014 00:07:46 +0000
(16:07 -0800)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 13 Dec 2014 00:10:44 +0000
(16:10 -0800)
This fixes a race condition, as there was only one kernel stack.
benchmarks/common/crt.S
patch
|
blob
|
history
diff --git
a/benchmarks/common/crt.S
b/benchmarks/common/crt.S
index 24d22e8e6f09d0c9db1bb55c5410299bc9dcaa43..2c004d1308e152a459650bb9465f1a17305914c6 100644
(file)
--- a/
benchmarks/common/crt.S
+++ b/
benchmarks/common/crt.S
@@
-126,15
+126,7
@@
_start:
sret
trap_entry:
- csrw sup0, sp
- csrw sup1, t0
- csrr t0, status
- andi t0, t0, SR_PS
- bnez t0, 1f
- la sp, kstacktop
-1:
addi sp, sp, -272
- csrr t0, sup1
SREG x1, 8(sp)
SREG x2, 16(sp)
@@
-216,13
+208,8
@@
trap_entry:
LREG x30, 240(sp)
LREG x31, 248(sp)
- csrr sp, sup0
+ addi sp, sp, 272
sret
-.bss
-.align 4
-.skip 4096
-kstacktop:
-
.section .tbss
tls_start: