Skip to content

Commit 7563c19

Browse files
committed
fix(arch): remove unused memory_barrier function
1 parent 482b644 commit 7563c19

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

src/arch/aarch64/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
use aarch64_cpu::asm::barrier::{ISH, dmb};
2-
31
pub mod kernel;
42
pub mod mm;
5-
6-
/// Force strict CPU ordering, serializes load and store operations.
7-
#[allow(dead_code)]
8-
#[inline(always)]
9-
pub(crate) fn memory_barrier() {
10-
dmb(ISH);
11-
}

src/arch/riscv64/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
pub mod kernel;
22
pub mod mm;
3-
4-
#[allow(dead_code)]
5-
#[inline(always)]
6-
pub(crate) fn memory_barrier() {
7-
riscv::asm::sfence_vma_all();
8-
}

src/arch/x86_64/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ pub(crate) fn swapgs(stack_frame: &ExceptionStackFrame) {
2222
#[cfg(not(feature = "common-os"))]
2323
#[inline(always)]
2424
pub(crate) fn swapgs(_stack_frame: &ExceptionStackFrame) {}
25-
26-
/// Force strict CPU ordering, serializes load and store operations.
27-
#[allow(dead_code)]
28-
#[inline(always)]
29-
pub(crate) fn memory_barrier() {
30-
use core::arch::asm;
31-
unsafe {
32-
asm!("mfence", options(nostack, nomem, preserves_flags));
33-
}
34-
}

0 commit comments

Comments
 (0)