summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-24 21:09:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-24 21:09:16 +0000
commit7538441a4078e2949fa252547e911a2f4c1bd9ac (patch)
treebc781341bb5a4e8567a57a1ae839ac57bb9e6e26 /sys
parentc9fb4a8c638cf0be180ca440a7dccf097999cbe5 (diff)
Barriers for mips64
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drmP.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 0a03cdba0bd..94fca1d3174 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drmP.h,v 1.176 2014/04/07 06:43:11 jsg Exp $ */
+/* $OpenBSD: drmP.h,v 1.177 2014/05/24 21:09:15 miod Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*/
@@ -309,6 +309,10 @@ div_u64(uint64_t x, uint32_t y)
#define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory");
#define DRM_MEMORYBARRIER() __asm __volatile( \
"lock; addl $0,0(%%rsp)" : : : "memory");
+#elif defined(__mips64__)
+#define DRM_READMEMORYBARRIER() DRM_MEMORYBARRIER()
+#define DRM_WRITEMEMORYBARRIER() DRM_MEMORYBARRIER()
+#define DRM_MEMORYBARRIER() mips_sync()
#elif defined(__powerpc__)
#define DRM_READMEMORYBARRIER() DRM_MEMORYBARRIER()
#define DRM_WRITEMEMORYBARRIER() DRM_MEMORYBARRIER()