Skip to content

Commit c6231ce

Browse files
committed
bug fix
1 parent 149d917 commit c6231ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

riscv/src/interrupt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub mod machine {
8383
}
8484

8585
// Restore MSTATUS.PIE, MSTATUS.MPP, and SEPC
86-
if !mstatus.mpie() {
86+
if mstatus.mpie() {
8787
mstatus::set_mpie();
8888
}
8989
mstatus::set_mpp(mstatus.mpp());
@@ -172,7 +172,7 @@ pub mod supervisor {
172172
}
173173

174174
// Restore SSTATUS.SPIE, SSTATUS.SPP, and SEPC
175-
if !sstatus.spie() {
175+
if sstatus.spie() {
176176
sstatus::set_spie();
177177
}
178178
sstatus::set_spp(sstatus.spp());

0 commit comments

Comments
 (0)