summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include/linux/compiler.h
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2019-04-14 10:14:50 +0000
committerjsg <jsg@openbsd.org>2019-04-14 10:14:50 +0000
commit7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87 (patch)
tree6c75a844a113c0987bd29861e921b2d54ba0752c /sys/dev/pci/drm/include/linux/compiler.h
parentAdd lock order checking for timeouts (diff)
downloadwireguard-openbsd-7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87.tar.xz
wireguard-openbsd-7f4dd37977dc50fdbac8c09deb3ed9ed9b8d0c87.zip
Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34. Adds support for more Intel hardware: Broxton/Apollo Lake (was is_preliminary in 4.4) Amber Lake (another Kaby Lake refresh) Gemini Lake Coffee Lake Whiskey Lake Cannon Lake (though no hardware with Intel graphics ever shipped) Ice Lake (alpha support, hardware not released) This does not add support for new radeon hardware on the AMD side as newer radeons have a different kernel driver (amdgpu). Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping and a bunch of other developers for testing.
Diffstat (limited to 'sys/dev/pci/drm/include/linux/compiler.h')
-rw-r--r--sys/dev/pci/drm/include/linux/compiler.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/include/linux/compiler.h b/sys/dev/pci/drm/include/linux/compiler.h
new file mode 100644
index 00000000000..c2f09e25afe
--- /dev/null
+++ b/sys/dev/pci/drm/include/linux/compiler.h
@@ -0,0 +1,33 @@
+/* Public domain. */
+
+#ifndef _LINUX_COMPILER_H
+#define _LINUX_COMPILER_H
+
+#include <linux/kconfig.h>
+
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#define likely(x) __builtin_expect(!!(x), 1)
+
+#define __force
+#define __always_unused __unused
+#define __maybe_unused
+#define __read_mostly
+#define __iomem
+#define __must_check
+#define __init
+#define __exit
+#define __deprecated
+#define __always_inline inline
+#define noinline __attribute__((noinline))
+
+#ifndef __user
+#define __user
+#endif
+
+#define barrier() __asm __volatile("" : : : "memory")
+
+#define __printf(x, y)
+
+#define uninitialized_var(x) x
+
+#endif