diff --git a/ahcid/src/main.rs b/ahcid/src/main.rs index 02a514589a..3bc17ebcbf 100644 --- a/ahcid/src/main.rs +++ b/ahcid/src/main.rs @@ -30,11 +30,6 @@ fn main() { print!("{}", format!(" + AHCI on: {:X} IRQ: {}\n", bar, irq)); thread::spawn(move || { - unsafe { - syscall::iopl(3).expect("ahcid: failed to get I/O permission"); - asm!("cli" :::: "intel", "volatile"); - } - let address = unsafe { syscall::physmap(bar, 4096, MAP_WRITE).expect("ahcid: failed to map address") }; { let socket_fd = syscall::open(":disk", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("ahcid: failed to create disk scheme"); @@ -56,7 +51,7 @@ fn main() { let mut packet = Packet::default(); if socket.read(&mut packet).expect("ahcid: failed to read disk scheme") == 0 { break; - } + } scheme.handle(&mut packet); socket.write(&mut packet).expect("ahcid: failed to write disk scheme"); } diff --git a/e1000d/src/main.rs b/e1000d/src/main.rs index 90f2590c0f..f3baf1bbaf 100644 --- a/e1000d/src/main.rs +++ b/e1000d/src/main.rs @@ -30,11 +30,6 @@ fn main() { print!("{}", format!(" + E1000 on: {:X}, IRQ: {}\n", bar, irq)); thread::spawn(move || { - unsafe { - syscall::iopl(3).expect("e1000d: failed to get I/O permission"); - asm!("cli" :::: "intel", "volatile"); - } - let socket_fd = syscall::open(":network", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("e1000d: failed to create network scheme"); let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); diff --git a/ps2d/src/main.rs b/ps2d/src/main.rs index ba5e330e2c..3a0615c5dd 100644 --- a/ps2d/src/main.rs +++ b/ps2d/src/main.rs @@ -122,7 +122,7 @@ fn main() { thread::spawn(|| { unsafe { iopl(3).expect("ps2d: failed to get I/O permission"); - asm!("cli" :::: "intel", "volatile"); + asm!("cli" : : : : "intel", "volatile"); } let input = File::open("display:input").expect("ps2d: failed to open display:input"); diff --git a/rtl8168d/src/main.rs b/rtl8168d/src/main.rs index ca441cd84e..00d6f33678 100644 --- a/rtl8168d/src/main.rs +++ b/rtl8168d/src/main.rs @@ -31,11 +31,6 @@ fn main() { print!("{}", format!(" + RTL8168 on: {:X}, IRQ: {}\n", bar, irq)); thread::spawn(move || { - unsafe { - syscall::iopl(3).expect("rtl8168d: failed to get I/O permission"); - asm!("cli" :::: "intel", "volatile"); - } - let socket_fd = syscall::open(":network", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK).expect("rtl8168d: failed to create network scheme"); let socket = Arc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) }));