Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/include/asm drm: Fix missing barrier...



details:   https://anonhg.NetBSD.org/src/rev/1ecb463c9456
branches:  trunk
changeset: 368548:1ecb463c9456
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jul 17 22:02:23 2022 +0000

description:
drm: Fix missing barrier definitions on arm.

The definition will work on armv7; don't think we have any drmkms
drivers on armv<7.

diffstat:

 sys/external/bsd/common/include/asm/barrier.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 7cd2b6fe158a -r 1ecb463c9456 sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h     Sun Jul 17 20:23:17 2022 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h     Sun Jul 17 22:02:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: barrier.h,v 1.14 2022/07/17 18:45:48 riastradh Exp $   */
+/*     $NetBSD: barrier.h,v 1.15 2022/07/17 22:02:23 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -54,6 +54,10 @@
 #define        mb()    __asm __volatile ("dsb sy" ::: "memory")
 #define        wmb()   __asm __volatile ("dsb st" ::: "memory")
 #define        rmb()   __asm __volatile ("dsb ld" ::: "memory")
+#elif defined(__arm__)
+#define        mb()    __asm __volatile ("dsb" ::: "memory")
+#define        wmb()   mb()
+#define        rmb()   mb()
 #elif defined(__i386__) || defined(__x86_64__)
 #include <x86/cpufunc.h>
 #define        mb()    x86_mfence()



Home | Main Index | Thread Index | Old Index