summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-11-11 08:26:48 +0800
committerGitHub <[email protected]>2019-11-11 08:26:48 +0800
commitcc2316ed4e7ac8ce9d2ecf8ca53585d9b838b973 (patch)
tree5c3dd03313dbd4093666bc72cc623cdc189d791a
parent3777bec0758a0311ba74691361aad035ff070274 (diff)
parent80a4912baf79d46c696ab4a5c7da92fb511d8cd9 (diff)
Merge pull request #3178 from IronMan999/master
修改了上下文切换退出时的bug,该bug会导致中断被提前打开造成死锁
-rw-r--r--libcpu/risc-v/common/context_gcc.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpu/risc-v/common/context_gcc.S b/libcpu/risc-v/common/context_gcc.S
index f28b15319b..5c9f05c4e8 100644
--- a/libcpu/risc-v/common/context_gcc.S
+++ b/libcpu/risc-v/common/context_gcc.S
@@ -175,7 +175,7 @@ rt_hw_context_switch_exit:
LOAD x1, 1 * REGBYTES(sp)
li t0, 0x00001800
- csrs mstatus, t0
+ csrw mstatus, t0
LOAD a0, 2 * REGBYTES(sp)
csrs mstatus, a0