Skip to content

Commit 16c85a1

Browse files
committed
arm64: Use acquire/release semantics instead of explicit DMB
This patch changes the test_and_*_bit functions to use the load-acquire/store-release instructions instead of explicit DMB. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent c47d6a0 commit 16c85a1

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/arm64/lib/bitops.S‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ ENTRY( \name )
4646
mov x2, #1
4747
add x1, x1, x0, lsr #3 // Get word offset
4848
lsl x4, x2, x3 // Create mask
49-
smp_dmb ish
50-
1: ldxr x2, [x1]
49+
1: ldaxr x2, [x1]
5150
lsr x0, x2, x3 // Save old value of bit
5251
\instr x2, x2, x4 // toggle bit
53-
stxr w5, x2, [x1]
52+
stlxr w5, x2, [x1]
5453
cbnz w5, 1b
55-
smp_dmb ish
5654
and x0, x0, #1
5755
3: ret
5856
ENDPROC(\name )

0 commit comments

Comments
 (0)