Skip to content

Commit

Permalink
fixes to code for new toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Feb 24, 2022
1 parent fe85db8 commit 667e91a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion drv/lpc55-romapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion drv/lpc55-spi-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions drv/stm32xx-sys/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ where
S: pac::RegisterSpec<Ux = u32> + 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)));
}
}

Expand Down
2 changes: 2 additions & 0 deletions stage0/src/hypo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion stage0/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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;

Expand Down
1 change: 1 addition & 0 deletions sys/kern/src/arch/arm_m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion sys/kern/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion sys/userlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion task/ping/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#![no_std]
#![no_main]
#![feature(asm)]

use core::arch::asm;

use userlib::*;

Expand Down

0 comments on commit 667e91a

Please sign in to comment.