(input: &str)
| 100 | let mapped_start = new_kvirt_area.range().start + 2 * PAGE_SIZE; |
| 101 | let mapped_end = mapped_start + KERNEL_STACK_SIZE; |
| 102 | Ok(Self { |
| 103 | kvirt_area: new_kvirt_area, |
| 104 | tlb_coherent: AtomicCpuSet::new(CpuSet::new_empty()), |
| 105 | end_vaddr: mapped_end, |
| 106 | has_guard_page: true, |
| 107 | }) |
| 108 | } |
| 109 | |
| 110 | /// Flushes the TLB for the current CPU if necessary. |
| 111 | pub(super) fn flush_tlb(&self, irq_guard: &DisabledLocalIrqGuard) { |
| 112 | let cur_cpu = irq_guard.current_cpu(); |
| 113 | if !self.tlb_coherent.contains(cur_cpu, Ordering::Relaxed) { |
| 114 | tlb_flush_addr_range(&self.kvirt_area.range()); |
| 115 | self.tlb_coherent.add(cur_cpu, Ordering::Relaxed); |
no test coverage detected