Skip to content

Commit ca1b140

Browse files
taiki-eAmanieu
authored andcommitted
core_arch: Fix ARMv6 CP15 barrier
1 parent 6d80869 commit ca1b140

File tree

1 file changed

+6
-3
lines changed
  • crates/core_arch/src/arm_shared/barrier

1 file changed

+6
-3
lines changed

crates/core_arch/src/arm_shared/barrier/cp15.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ impl super::super::sealed::Dmb for SY {
1111
#[inline(always)]
1212
unsafe fn __dmb(&self) {
1313
asm!(
14-
"mcr p15, 0, r0, c7, c10, 5",
14+
"mcr p15, 0, {}, c7, c10, 5",
15+
in(reg) 0_u32,
1516
options(preserves_flags, nostack)
1617
)
1718
}
@@ -21,7 +22,8 @@ impl super::super::sealed::Dsb for SY {
2122
#[inline(always)]
2223
unsafe fn __dsb(&self) {
2324
asm!(
24-
"mcr p15, 0, r0, c7, c10, 4",
25+
"mcr p15, 0, {}, c7, c10, 4",
26+
in(reg) 0_u32,
2527
options(preserves_flags, nostack)
2628
)
2729
}
@@ -31,7 +33,8 @@ impl super::super::sealed::Isb for SY {
3133
#[inline(always)]
3234
unsafe fn __isb(&self) {
3335
asm!(
34-
"mcr p15, 0, r0, c7, c5, 4",
36+
"mcr p15, 0, {}, c7, c5, 4",
37+
in(reg) 0_u32,
3538
options(preserves_flags, nostack)
3639
)
3740
}

0 commit comments

Comments
 (0)