From 804d6254f9b95c8a1b745129e734e80727a475a4 Mon Sep 17 00:00:00 2001 From: Harry Cheng Date: Sun, 28 Jul 2019 19:15:42 +0800 Subject: [PATCH] Fix x86_64 --- kernel/src/arch/x86_64/interrupt/handler.rs | 2 +- kernel/src/arch/x86_64/paging.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/src/arch/x86_64/interrupt/handler.rs b/kernel/src/arch/x86_64/interrupt/handler.rs index 2b5c099..0996b53 100644 --- a/kernel/src/arch/x86_64/interrupt/handler.rs +++ b/kernel/src/arch/x86_64/interrupt/handler.rs @@ -86,7 +86,7 @@ pub extern "C" fn rust_trap(tf: &mut TrapFrame) { Breakpoint => breakpoint(), DoubleFault => double_fault(tf), PageFault => page_fault(tf), - IRQ0...63 => { + IRQ0..=63 => { let irq = tf.trap_num as u8 - IRQ0; super::ack(irq); // must ack before switching match irq { diff --git a/kernel/src/arch/x86_64/paging.rs b/kernel/src/arch/x86_64/paging.rs index 92a5baf..99711fd 100644 --- a/kernel/src/arch/x86_64/paging.rs +++ b/kernel/src/arch/x86_64/paging.rs @@ -282,8 +282,8 @@ impl FrameDeallocator for FrameAllocatorForX86 { fn flush_tlb_all(vaddr: usize) { // FIXME: too slow, disable now. return; - if !super::AP_CAN_INIT.load(Ordering::Relaxed) { - return; - } - super::ipi::invoke_on_allcpu(move || tlb::flush(VirtAddr::new(vaddr as u64)), false); + // if !super::AP_CAN_INIT.load(Ordering::Relaxed) { + // return; + // } + // super::ipi::invoke_on_allcpu(move || tlb::flush(VirtAddr::new(vaddr as u64)), false); }