diff options
author | 2018-08-20 19:36:04 +0000 | |
---|---|---|
committer | 2018-08-20 19:36:04 +0000 | |
commit | 4ebb38a99107a5a9b7072a47d63d9c8e316eda71 (patch) | |
tree | 3bd09a749992957eaf3dfee640368d412abb02e8 | |
parent | Add arm64 support. On ARM write-combining translates into the normal uncached (diff) | |
download | wireguard-openbsd-4ebb38a99107a5a9b7072a47d63d9c8e316eda71.tar.xz wireguard-openbsd-4ebb38a99107a5a9b7072a47d63d9c8e316eda71.zip |
Memory barriers for arm64. These are somewhat stronger than strictly
necessary since we define the linux compat symbols in terms of a single set
of macros.
ok jsg@, mpi@, visa@
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 1d9bcf534c8..2a8937a4499 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.218 2018/06/25 22:29:16 kettenis Exp $ */ +/* $OpenBSD: drmP.h,v 1.219 2018/08/20 19:36:04 kettenis Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -158,6 +158,10 @@ extern struct cfdriver drm_cd; #define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); #define DRM_MEMORYBARRIER() __asm __volatile( \ "lock; addl $0,0(%%rsp)" : : : "memory"); +#elif defined(__aarch64__) +#define DRM_READMEMORYBARRIER() __membar("dsb ld") +#define DRM_WRITEMEMORYBARRIER() __membar("dsb st") +#define DRM_MEMORYBARRIER() __membar("dsb sy") #elif defined(__mips64__) #define DRM_READMEMORYBARRIER() DRM_MEMORYBARRIER() #define DRM_WRITEMEMORYBARRIER() DRM_MEMORYBARRIER() |