Skip to content

Commit

Permalink
Clean fastpath restore (#7)
Browse files Browse the repository at this point in the history
* add the aarch64 clean fastpath restore

* try to add the riscv fastpath_restore,but failed

* use a way to solve the problem

* clean some warnings
  • Loading branch information
ZhiyuanSue committed Aug 26, 2024
1 parent 7208b9d commit 86b93d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/arch/aarch64/asid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ pub fn write_it_asid_pool(it_ap_cap: &cap_t, it_vspace_cap: &cap_t) {
let asid_map = asid_map_t::new_vspace(it_vspace_cap.get_pgd_base_ptr());
ap[IT_ASID] = asid_map;
set_asid_pool_by_index(IT_ASID >> asidLowBits, ap as *const _ as usize);
}
}
4 changes: 1 addition & 3 deletions src/arch/aarch64/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ pub fn invalidate_local_tlb_va_asid(mva_plus_asid: usize) {
isb();
}


#[inline(always)]
pub fn clean_by_va_pou(vaddr: usize, _paddr: usize) {
unsafe {
Expand Down Expand Up @@ -151,7 +150,6 @@ pub fn clean_cache_range_poc(start: usize, end: usize, pstart: usize) {
}
}


#[inline]
pub fn clean_cache_range_pou(start: usize, end: usize, pstart: usize) {
for idx in LINE_INDEX(start)..LINE_INDEX(end) + 1 {
Expand Down Expand Up @@ -332,4 +330,4 @@ pub enum mair_types {
NORMAL_NC,
NORMAL,
NORMAL_WT,
}
}
4 changes: 2 additions & 2 deletions src/arch/riscv64/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ impl PTE {
pub fn get_ptr(&self) -> usize {
self as *const Self as usize
}
#[inline]
pub fn get_mut_ptr(&mut self) -> usize {
#[inline]
pub fn get_mut_ptr(&mut self) -> usize {
self as *mut Self as usize
}
}

0 comments on commit 86b93d6

Please sign in to comment.