summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2020-11-09 05:42:43 +0000
committerjsg <jsg@openbsd.org>2020-11-09 05:42:43 +0000
commit05e32666eb9d89d6392dbf7b70f3ee71d9ed7964 (patch)
tree161e1635f4927b70f05202deb2e4504d01a0e798
parentUse RB_FOREACH_SAFE instead of handrolling it (diff)
downloadwireguard-openbsd-05e32666eb9d89d6392dbf7b70f3ee71d9ed7964.tar.xz
wireguard-openbsd-05e32666eb9d89d6392dbf7b70f3ee71d9ed7964.zip
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)