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 linux: Add alpha definit...



details:   https://anonhg.NetBSD.org/src/rev/7ae7481e3639
branches:  trunk
changeset: 368565:7ae7481e3639
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 19 21:30:40 2022 +0000

description:
linux: Add alpha definitions of mb/wmb/rmb too for fun.

Who wants to plug an amdgpu into their alpha?

diffstat:

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

diffs (21 lines):

diff -r e1482736507e -r 7ae7481e3639 sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h     Tue Jul 19 16:40:26 2022 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h     Tue Jul 19 21:30:40 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: barrier.h,v 1.18 2022/07/19 16:40:26 riastradh Exp $   */
+/*     $NetBSD: barrier.h,v 1.19 2022/07/19 21:30:40 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -82,6 +82,11 @@
 #define        mb()    wbflush()
 #define        wmb()   mb()
 #define        rmb()   mb()
+#elif defined(__alpha__)
+#include <machine/alpha_cpu.h>
+#define        mb()    alpha_mb()
+#define        wmb()   alpha_wmb()
+#define        rmb()   mb()
 #else
 #error Missing Linux memory-mapped I/O barriers for this architecture.
 #endif



Home | Main Index | Thread Index | Old Index