maually remove warning, pt6

master
Ben Pig Chu 6 years ago
parent 6eb49a0106
commit d737b1e7ba

@ -134,6 +134,12 @@ fn log2(x: u16) -> usize {
#[inline(always)]
#[cfg(not(target_arch = "x86_64"))]
fn log2(x: u16) -> usize {
log2_naive(x)
}
#[cfg(not(target_arch = "x86_64"))]
#[inline(always)]
fn log2_naive(mut x: u16) -> usize {
//a naive implement
assert_ne!(x, 0);
let mut pos = -1;
@ -148,6 +154,7 @@ fn log2(x: u16) -> usize {
mod tests {
use super::*;
#[cfg(not(target_arch = "x86_64"))]
#[test]
fn log2_() {
for x in 1..=0xffff {

@ -1,6 +1,5 @@
use crate::arch::interrupt::TrapFrame;
use bcm2837::interrupt::Controller;
use log::*;
pub use bcm2837::interrupt::Interrupt;

@ -5,7 +5,7 @@ use ucore_memory::PAGE_SIZE;
use atags::atags::Atags;
use aarch64::{barrier, regs::*, addr::*};
use aarch64::paging::{PhysFrame as Frame, memory_attribute::*};
use crate::memory::{FRAME_ALLOCATOR, init_heap, MemoryArea, MemoryAttr, MemorySet, Linear};
use crate::memory::{FRAME_ALLOCATOR, init_heap, MemoryAttr, MemorySet, Linear};
/// Memory initialization.
pub fn init() {

@ -1,8 +1,6 @@
//! Page table implementations for aarch64.
use ucore_memory::memory_set::*;
use ucore_memory::PAGE_SIZE;
use ucore_memory::paging::*;
use aarch64::asm::{tlb_invalidate, tlb_invalidate_all, flush_icache_all, ttbr_el1_read, ttbr_el1_write};
use aarch64::asm::{tlb_invalidate, tlb_invalidate_all, ttbr_el1_read, ttbr_el1_write};
use aarch64::{PhysAddr, VirtAddr};
use aarch64::paging::{Mapper, PageTable as Aarch64PageTable, PageTableEntry, PageTableFlags as EF, RecursivePageTable};
use aarch64::paging::{FrameAllocator, FrameDeallocator, Page, PhysFrame as Frame, Size4KiB, Size2MiB, Size1GiB};

Loading…
Cancel
Save