summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-11-09 05:42:44 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-11-09 05:42:44 +0000
commit5339bfb791a6d959ebd89a90504dc5c6c4eb01ee (patch)
tree01012e0a31091a6f091da138cc41eda87e9b522b
parenteb36312c3e4e3fe02e6999bb8b84434c38315553 (diff)
use 64 bit atomic builtins on i386 for atomic64
-rw-r--r--sys/dev/pci/drm/include/linux/atomic.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/include/linux/atomic.h b/sys/dev/pci/drm/include/linux/atomic.h
index c0a4a368a39..cefbfffc086 100644
--- a/sys/dev/pci/drm/include/linux/atomic.h
+++ b/sys/dev/pci/drm/include/linux/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.13 2020/10/26 04:10:25 jsg Exp $ */
+/* $OpenBSD: atomic.h,v 1.14 2020/11/09 05:42:43 jsg Exp $ */
/**
* \file drm_atomic.h
* Atomic operations used in the DRM which may or may not be provided by the OS.
@@ -120,7 +120,9 @@ atomic_dec_if_positive(volatile int *v)
#define atomic_long_read(p) READ_ONCE(*(p))
-#ifdef __LP64__
+/* 32 bit powerpc lacks 64 bit atomics */
+#if !defined(__powerpc__) || defined(__powerpc64__)
+
typedef int64_t atomic64_t;
#define ATOMIC64_INIT(x) (x)