Module Name:    src
Committed By:   skrll
Date:           Fri Apr 17 07:03:40 UTC 2015

Modified Files:
        src/common/lib/libc/arch/arm/atomic: atomic_swap.S

Log Message:
ARM ARM D7.3.2 - ensure all previous accesses are observed before
the lock is cleared


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/common/lib/libc/arch/arm/atomic/atomic_swap.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/arm/atomic/atomic_swap.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.11 src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.12
--- src/common/lib/libc/arch/arm/atomic/atomic_swap.S:1.11	Sat Jun 28 20:18:55 2014
+++ src/common/lib/libc/arch/arm/atomic/atomic_swap.S	Fri Apr 17 07:03:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_swap.S,v 1.11 2014/06/28 20:18:55 joerg Exp $	*/
+/*	$NetBSD: atomic_swap.S,v 1.12 2015/04/17 07:03:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007,2012 The NetBSD Foundation, Inc.
@@ -87,6 +87,11 @@ STRONG_ALIAS(_atomic_swap_ptr,_atomic_sw
 #if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE)
 ENTRY_NP(__sync_lock_release_4)
 	mov	r1, #0
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, r3, c7, c10, 5	/* data memory barrier */
+#endif
 	strb	r1, [r0]
 	RET
 END(__sync_lock_release_4)
@@ -123,6 +128,11 @@ STRONG_ALIAS(_atomic_swap_uchar,_atomic_
 #if (!defined(_KERNEL) || defined(_RUMPKERNEL)) && !defined(_STANDALONE)
 ENTRY_NP(__sync_lock_release_1)
 	mov	r1, #0
+#ifdef _ARM_ARCH_7
+	dmb
+#else
+	mcr	p15, 0, r3, c7, c10, 5	/* data memory barrier */
+#endif
 	strb	r1, [r0]
 	RET
 END(__sync_lock_release_1)

Reply via email to