From bb123add188c4e20c638d8a5ca5ab5af30513100 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Sun, 7 Apr 2019 01:32:32 +0800 Subject: [PATCH] Eliminate multiple warnings, update user app repo Signed-off-by: Harry Chen --- kernel/src/arch/mipsel/mod.rs | 2 -- kernel/src/drivers/serial/16550_reg.rs | 2 ++ kernel/src/sync/mutex.rs | 4 ++-- user | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/src/arch/mipsel/mod.rs b/kernel/src/arch/mipsel/mod.rs index 6347d3c..9bc4c4e 100644 --- a/kernel/src/arch/mipsel/mod.rs +++ b/kernel/src/arch/mipsel/mod.rs @@ -12,7 +12,6 @@ pub mod driver; use log::*; use mips::registers::cp0; -use mips::instructions; #[cfg(feature = "board_malta")] #[path = "board/malta/mod.rs"] @@ -40,7 +39,6 @@ pub extern fn rust_main() -> ! { let ebase = cp0::ebase::read_u32(); let cpu_id = ebase & 0x3ff; let dtb_start = _dtb_start as usize; - let dtb_end = _dtb_end as usize; if cpu_id != BOOT_CPU_ID { // TODO: run others_main on other CPU diff --git a/kernel/src/drivers/serial/16550_reg.rs b/kernel/src/drivers/serial/16550_reg.rs index b624729..62330c4 100644 --- a/kernel/src/drivers/serial/16550_reg.rs +++ b/kernel/src/drivers/serial/16550_reg.rs @@ -1,5 +1,7 @@ //! 16550 serial adapter driver for malta board +#![allow(dead_code)] + use core::fmt::{Write, Result, Arguments}; use core::ptr::{read_volatile, write_volatile}; use spin::Mutex; diff --git a/kernel/src/sync/mutex.rs b/kernel/src/sync/mutex.rs index e319fde..8af1460 100644 --- a/kernel/src/sync/mutex.rs +++ b/kernel/src/sync/mutex.rs @@ -216,7 +216,7 @@ impl MutexSupport for Spin { unsafe { #[cfg(target_arch = "x86_64")] asm!("pause" :::: "volatile"); - #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] + #[cfg(any(target_arch = "riscv32", target_arch = "riscv64", target_arch = "mips"))] asm!("nop" :::: "volatile"); #[cfg(target_arch = "aarch64")] asm!("yield" :::: "volatile"); @@ -254,7 +254,7 @@ impl MutexSupport for SpinNoIrq { unsafe { #[cfg(target_arch = "x86_64")] asm!("pause" :::: "volatile"); - #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] + #[cfg(any(target_arch = "riscv32", target_arch = "riscv64", target_arch = "mips"))] asm!("nop" :::: "volatile"); #[cfg(target_arch = "aarch64")] asm!("yield" :::: "volatile"); diff --git a/user b/user index 67890ae..a460c5b 160000 --- a/user +++ b/user @@ -1 +1 @@ -Subproject commit 67890aeb4205083d5a95b1f70de92ae39b549c8c +Subproject commit a460c5b32744292ed50922a159fa22c830aa61b9