Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd Move smp_mb_before/after_atomic from linux/...



details:   https://anonhg.NetBSD.org/src/rev/06c750595268
branches:  trunk
changeset: 1028434:06c750595268
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:02:46 2021 +0000

description:
Move smp_mb_before/after_atomic from linux/atomic.h to asm/barrier.h.

diffstat:

 sys/external/bsd/common/include/asm/barrier.h |  10 +++++++++-
 sys/external/bsd/drm2/include/linux/atomic.h  |  10 +---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (46 lines):

diff -r 7bade696c64e -r 06c750595268 sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h     Sun Dec 19 11:02:38 2021 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h     Sun Dec 19 11:02:46 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: barrier.h,v 1.6 2021/12/19 10:56:58 riastradh Exp $    */
+/*     $NetBSD: barrier.h,v 1.7 2021/12/19 11:02:46 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -70,4 +70,12 @@
 #  define      smp_read_barrier_depends()      do {} while (0)
 #endif
 
+#if defined(MULTIPROCESSOR) && !defined(__HAVE_ATOMIC_AS_MEMBAR)
+#  define      smp_mb__before_atomic()         membar_exit()
+#  define      smp_mb__after_atomic()          membar_enter()
+#else
+#  define      smp_mb__before_atomic()         __insn_barrier()
+#  define      smp_mb__after_atomic()          __insn_barrier()
+#endif
+
 #endif  /* _ASM_BARRIER_H_ */
diff -r 7bade696c64e -r 06c750595268 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Sun Dec 19 11:02:38 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Sun Dec 19 11:02:46 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.32 2021/12/19 11:02:38 riastradh Exp $    */
+/*     $NetBSD: atomic.h,v 1.33 2021/12/19 11:02:46 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,14 +38,6 @@
 
 #include <asm/barrier.h>
 
-#if defined(MULTIPROCESSOR) && !defined(__HAVE_ATOMIC_AS_MEMBAR)
-#  define      smp_mb__before_atomic()         membar_exit()
-#  define      smp_mb__after_atomic()          membar_enter()
-#else
-#  define      smp_mb__before_atomic()         __insn_barrier()
-#  define      smp_mb__after_atomic()          __insn_barrier()
-#endif
-
 #define        xchg(P, V)                                                            \
        (sizeof(*(P)) == 4 ? atomic_swap_32((volatile uint32_t *)P, V)        \
            : sizeof(*(P)) == 8 ? atomic_swap_64((volatile uint64_t *)P, V)   \



Home | Main Index | Thread Index | Old Index