提交 87a3500b 编写于 作者: Y Yifan Wu

Remove meaningless sstatus::set_sie() when initializing.

上级 30a0de23
......@@ -22,8 +22,6 @@ impl TrapContext {
let mut sstatus = sstatus::read();
// set CPU privilege to User after trapping back
sstatus.set_spp(SPP::User);
// enable Supervisor mode interrupt after trapping back
sstatus.set_spie(true);
let mut cx = Self {
x: [0; 32],
sstatus,
......
......@@ -10,7 +10,6 @@ use riscv::register::{
Interrupt,
},
stval,
sstatus,
sie,
};
use crate::syscall::syscall;
......@@ -41,11 +40,6 @@ fn set_user_trap_entry() {
}
}
#[allow(unused)]
pub fn enable_interrupt() {
unsafe { sstatus::set_sie(); }
}
pub fn enable_timer_interrupt() {
unsafe { sie::set_stimer(); }
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册