-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
acle/barrier: use llvm.{arm,aarch64}.{dmb,dsb,isb} instead of asm!
also make these available on architectures that don't have a dedicated DMB / DSB / ISB instruction addresses #557 (comment)
- Loading branch information
Showing
4 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Reference: ARM11 MPCore Processor Technical Reference Manual (ARM DDI 0360E) Section 3.5 "Summary | ||
// of CP15 instructions" | ||
|
||
/// Full system is the required shareability domain, reads and writes are the | ||
/// required access types | ||
pub struct SY; | ||
|
||
impl super::super::sealed::Dmb for SY { | ||
#[inline(always)] | ||
unsafe fn __dmb(&self) { | ||
asm!("mcr p15, 0, r0, c7, c10, 5" : : : "memory" : "volatile") | ||
} | ||
} | ||
|
||
impl super::super::sealed::Dsb for SY { | ||
#[inline(always)] | ||
unsafe fn __dsb(&self) { | ||
asm!("mcr p15, 0, r0, c7, c10, 4" : : : "memory" : "volatile") | ||
} | ||
} | ||
|
||
impl super::super::sealed::Isb for SY { | ||
#[inline(always)] | ||
unsafe fn __isb(&self) { | ||
asm!("mcr p15, 0, r0, c7, c5, 4" : : : "memory" : "volatile") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters