Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/arm/atomic Improve the membar_ops barri...



details:   https://anonhg.NetBSD.org/src/rev/85923b73b363
branches:  trunk
changeset: 378882:85923b73b363
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Apr 27 05:40:29 2021 +0000

description:
Improve the membar_ops barriers - no need to use dsb and wait for
completion.  Also, we only to act on the inner shareability domain.

diffstat:

 common/lib/libc/arch/arm/atomic/membar_ops.S |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 0fd84a65d317 -r 85923b73b363 common/lib/libc/arch/arm/atomic/membar_ops.S
--- a/common/lib/libc/arch/arm/atomic/membar_ops.S      Tue Apr 27 04:02:09 2021 +0000
+++ b/common/lib/libc/arch/arm/atomic/membar_ops.S      Tue Apr 27 05:40:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: membar_ops.S,v 1.6 2014/03/28 21:32:41 skrll Exp $     */
+/*     $NetBSD: membar_ops.S,v 1.7 2021/04/27 05:40:29 skrll Exp $     */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,10 +34,10 @@
 
 ENTRY_NP(_membar_producer)
 #ifdef _ARM_ARCH_7
-       dsb
+       dmb     ishst
 #else
        mov     r0, #0
-       mcr     p15, 0, r0, c7, c10, 4   /* Data Synchronization Barrier */
+       mcr     p15, 0, r0, c7, c10, 5  /* Data Memory Barrier */
 #endif
        RET
 END(_membar_producer)
@@ -47,7 +47,7 @@ STRONG_ALIAS(_membar_write,_membar_produ
 
 ENTRY_NP(_membar_sync)
 #ifdef _ARM_ARCH_7
-       dmb
+       dmb     ish
 #else
        mov     r0, #0
        mcr     p15, 0, r0, c7, c10, 5  /* Data Memory Barrier */



Home | Main Index | Thread Index | Old Index