summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2018-10-04 12:25:12 +0800
committerJun Nie <jun.nie@linaro.org>2018-10-04 12:25:12 +0800
commita317857ced07da6708d1664e406f02470f96e520 (patch)
treecfd22a40644dddfa904bd469cbeb68c70f198d83
parent77c54d982a0a4352091a6134f9cf71c091b1cb53 (diff)
downloadtrusted-firmware-tf-a317857ced07da6708d1664e406f02470f96e520.tar.gz
Aarch32: Add data sync for spin lock for ARMv7
Add data sync for spin lock because stl instruction on ARMv8 makes sure that data is sync while str instruction does not on ARMv7. Signed-off-by: Jun Nie <jun.nie@linaro.org>
-rw-r--r--lib/locks/aarch32/spinlock.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/locks/aarch32/spinlock.S b/lib/locks/aarch32/spinlock.S
index bcbfb3b..4c72ffb 100644
--- a/lib/locks/aarch32/spinlock.S
+++ b/lib/locks/aarch32/spinlock.S
@@ -59,7 +59,9 @@ func spin_unlock
#if ARM_ARCH_MAJOR == 8
stl r1, [r0]
#else
+ dmb
str r1, [r0]
+ dsb
#endif
bx lr
endfunc spin_unlock