diff --git a/drv/lpc55-romapi/src/lib.rs b/drv/lpc55-romapi/src/lib.rs index 42bed9029..83f8c44dc 100644 --- a/drv/lpc55-romapi/src/lib.rs +++ b/drv/lpc55-romapi/src/lib.rs @@ -2,7 +2,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -#![feature(asm)] #![feature(naked_functions)] #![no_std] diff --git a/drv/lpc55-spi-server/src/main.rs b/drv/lpc55-spi-server/src/main.rs index 165058147..8109be884 100644 --- a/drv/lpc55-spi-server/src/main.rs +++ b/drv/lpc55-spi-server/src/main.rs @@ -216,7 +216,7 @@ fn muck_with_gpios(syscon: &Syscon) { ]; for (pin, alt, mode, slew, invert, digi, od) in - core::array::IntoIter::new(pin_settings) + IntoIterator::into_iter(pin_settings) { iocon .iocon_configure(pin, alt, mode, slew, invert, digi, od) diff --git a/drv/stm32xx-sys/src/main.rs b/drv/stm32xx-sys/src/main.rs index 63f23dcee..d989fbc7e 100644 --- a/drv/stm32xx-sys/src/main.rs +++ b/drv/stm32xx-sys/src/main.rs @@ -61,11 +61,11 @@ where S: pac::RegisterSpec + pac::Readable + pac::Writable, { unsafe fn set_bit(&self, index: u8) { - self.modify(|r, w| unsafe { w.bits(r.bits() | 1 << index) }); + self.modify(|r, w| w.bits(r.bits() | 1 << index)); } unsafe fn clear_bit(&self, index: u8) { - self.modify(|r, w| unsafe { w.bits(r.bits() & !(1 << index)) }); + self.modify(|r, w| w.bits(r.bits() & !(1 << index))); } } diff --git a/stage0/src/hypo.rs b/stage0/src/hypo.rs index 7dbc03be9..8a18c6ea0 100644 --- a/stage0/src/hypo.rs +++ b/stage0/src/hypo.rs @@ -6,6 +6,8 @@ use lpc55_romapi::FlashStatus; +use core::arch::asm; + // FlashStatus is represented as a u32 so it's safe to return directly. // We convert on the receiving end for safety // #[cmse_nonsecure_entry] We want this eventually diff --git a/stage0/src/main.rs b/stage0/src/main.rs index d8a1d146d..bd1862478 100644 --- a/stage0/src/main.rs +++ b/stage0/src/main.rs @@ -3,7 +3,6 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. #![feature(cmse_nonsecure_entry)] -#![feature(asm)] #![feature(naked_functions)] #![feature(array_methods)] #![no_main] @@ -13,6 +12,8 @@ extern crate panic_halt; use cortex_m::peripheral::Peripherals; use cortex_m_rt::entry; +use core::arch::asm; + mod hypo; mod image_header; diff --git a/sys/kern/src/arch/arm_m.rs b/sys/kern/src/arch/arm_m.rs index ea685275f..bf3871d9f 100644 --- a/sys/kern/src/arch/arm_m.rs +++ b/sys/kern/src/arch/arm_m.rs @@ -72,6 +72,7 @@ //! context switches, and just always do full save/restore, eliminating PendSV. //! We'll see. +use core::arch::asm; use core::ptr::NonNull; use zerocopy::FromBytes; diff --git a/sys/kern/src/lib.rs b/sys/kern/src/lib.rs index a448a48f1..83b13d266 100644 --- a/sys/kern/src/lib.rs +++ b/sys/kern/src/lib.rs @@ -27,7 +27,8 @@ //! most clever algorithms used in kernels wind up requiring `unsafe`.) #![cfg_attr(target_os = "none", no_std)] -#![feature(asm)] +#![feature(asm_sym)] +#![feature(asm_const)] #![feature(naked_functions)] #[macro_use] diff --git a/sys/userlib/src/lib.rs b/sys/userlib/src/lib.rs index 6d85eecf8..69d5f14fc 100644 --- a/sys/userlib/src/lib.rs +++ b/sys/userlib/src/lib.rs @@ -25,7 +25,8 @@ //! See: https://github.com/rust-lang/rust/issues/73450#issuecomment-650463347 #![no_std] -#![feature(asm)] +#![feature(asm_const)] +#![feature(asm_sym)] #![feature(naked_functions)] #[macro_use] @@ -35,6 +36,7 @@ pub use abi::*; pub use num_derive::{FromPrimitive, ToPrimitive}; pub use num_traits::{FromPrimitive, ToPrimitive}; +use core::arch::asm; use core::marker::PhantomData; pub mod hl; diff --git a/task/ping/src/main.rs b/task/ping/src/main.rs index fb4eb3723..e36fb132e 100644 --- a/task/ping/src/main.rs +++ b/task/ping/src/main.rs @@ -4,7 +4,8 @@ #![no_std] #![no_main] -#![feature(asm)] + +use core::arch::asm; use userlib::*;