Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include/linux Nix memory barriers that...



details:   https://anonhg.NetBSD.org/src/rev/f2eab561c02b
branches:  trunk
changeset: 364640:f2eab561c02b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:40:53 2018 +0000

description:
Nix memory barriers that were nixed upstream.  Add smp_mb__after_atomic.

diffstat:

 sys/external/bsd/drm2/include/linux/atomic.h |  12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diffs (28 lines):

diff -r ccd2bf89aa87 -r f2eab561c02b sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 13:40:41 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 13:40:53 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.11 2018/08/27 13:40:41 riastradh Exp $    */
+/*     $NetBSD: atomic.h,v 1.12 2018/08/27 13:40:53 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -276,16 +276,10 @@
  * before/after memory barriers is not consistent throughout Linux.
  */
 #  define      smp_mb__before_atomic()         membar_sync()
-#  define      smp_mb__before_atomic_inc()     membar_sync()
-#  define      smp_mb__after_atomic_inc()      membar_sync()
-#  define      smp_mb__before_atomic_dec()     membar_sync()
-#  define      smp_mb__after_atomic_dec()      membar_sync()
+#  define      smp_mb__after_atomic()          membar_sync()
 #else
 #  define      smp_mb__before_atomic()         __insn_barrier()
-#  define      smp_mb__before_atomic_inc()     __insn_barrier()
-#  define      smp_mb__after_atomic_inc()      __insn_barrier()
-#  define      smp_mb__before_atomic_dec()     __insn_barrier()
-#  define      smp_mb__after_atomic_dec()      __insn_barrier()
+#  define      smp_mb__after_atomic()          __insn_barrier()
 #endif
 
 #endif  /* _LINUX_ATOMIC_H_ */



Home | Main Index | Thread Index | Old Index