From 80a4912baf79d46c696ab4a5c7da92fb511d8cd9 Mon Sep 17 00:00:00 2001 From: ZhangTao Date: Tue, 5 Nov 2019 10:30:47 +0800 Subject: 修改了上下文切换退出时的bug,该bug会导致中断被提前打开造成死锁 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/risc-v/common/context_gcc.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcpu') 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 -- cgit v1.3.1