diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-08-22 08:23:42 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-08-22 08:23:42 +0000 |
commit | 8c9e3d407da3b79ec776ef4488905edbc50c651e (patch) | |
tree | b8b747665d7a0064883c196d81167422d2843d9b | |
parent | cfbfb704c307d8db71a3bf4af8f36bcce2df2698 (diff) |
Add memory barriers for powerpc.
ok kettenis@, miod@
-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 b1ef5657152..d14ea9b87b0 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.130 2012/08/21 16:38:48 mpi Exp $ */ +/* $OpenBSD: drmP.h,v 1.131 2012/08/22 08:23:41 mpi Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -137,6 +137,10 @@ typedef u_int8_t u8; #define DRM_WRITEMEMORYBARRIER() __asm __volatile("" : : : "memory"); #define DRM_MEMORYBARRIER() __asm __volatile( \ "lock; addl $0,0(%%rsp)" : : : "memory"); +#elif defined(__powerpc__) +#define DRM_READMEMORYBARRIER() DRM_MEMORYBARRIER() +#define DRM_WRITEMEMORYBARRIER() DRM_MEMORYBARRIER() +#define DRM_MEMORYBARRIER() __asm __volatile("sync" : : : "memory"); #endif #define DRM_COPY_TO_USER(user, kern, size) copyout(kern, user, size) |