diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-04-30 10:58:37 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-04-30 10:58:37 -0400 |
commit | 16c85a1fd73eade2ae290d759924c09b4595f504 (patch) | |
tree | 6b9258d8c9836a19294924a971d5e9981ee609df /arch/arm64 | |
parent | c47d6a04e6ed22ccc5d89aaf2a136bf4971de310 (diff) |
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/lib/bitops.S | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm64/lib/bitops.S b/arch/arm64/lib/bitops.S index eaed8bbd78fc..36216d30cb9a 100644 --- a/arch/arm64/lib/bitops.S +++ b/arch/arm64/lib/bitops.S | |||
@@ -46,13 +46,11 @@ ENTRY( \name ) | |||
46 | mov x2, #1 | 46 | mov x2, #1 |
47 | add x1, x1, x0, lsr #3 // Get word offset | 47 | add x1, x1, x0, lsr #3 // Get word offset |
48 | lsl x4, x2, x3 // Create mask | 48 | lsl x4, x2, x3 // Create mask |
49 | smp_dmb ish | 49 | 1: ldaxr x2, [x1] |
50 | 1: ldxr x2, [x1] | ||
51 | lsr x0, x2, x3 // Save old value of bit | 50 | lsr x0, x2, x3 // Save old value of bit |
52 | \instr x2, x2, x4 // toggle bit | 51 | \instr x2, x2, x4 // toggle bit |
53 | stxr w5, x2, [x1] | 52 | stlxr w5, x2, [x1] |
54 | cbnz w5, 1b | 53 | cbnz w5, 1b |
55 | smp_dmb ish | ||
56 | and x0, x0, #1 | 54 | and x0, x0, #1 |
57 | 3: ret | 55 | 3: ret |
58 | ENDPROC(\name ) | 56 | ENDPROC(\name ) |