summaryrefslogtreecommitdiffhomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-06 20:44:55 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-06 20:45:01 -0600
commit734021d08b6381e0430d2a6278aeb3ca4c70c72a (patch)
tree980b0950d236c78dfdd759b5f8bb08524e9ca848 /src/compat
parentae7244a473338ef93b2f54e6284b4cd01fd13932 (diff)
compat: support neon.h on old kernels
Reported-by: Philipp Richter <richterphilipp.pops@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/Kbuild.include7
-rw-r--r--src/compat/neon/include/asm/neon.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include
index 94159fc..974c0d3 100644
--- a/src/compat/Kbuild.include
+++ b/src/compat/Kbuild.include
@@ -47,6 +47,13 @@ ccflags-y += -include $(cmd_include_path_prefix)/compat/memneq/include.h
wireguard-y += compat/memneq/memneq.o
endif
+ifeq ($(wildcard $(srctree)/arch/arm/include/asm/neon.h)$(CONFIG_ARM),y)
+ccflags-y += -I$(src)/compat/neon/include
+endif
+ifeq ($(wildcard $(srctree)/arch/arm64/include/asm/neon.h)$(CONFIG_ARM64),y)
+ccflags-y += -I$(src)/compat/neon/include
+endif
+
ifeq ($(CONFIG_X86_64),y)
ifeq ($(ssse3_instr),)
ssse3_instr := $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1)
diff --git a/src/compat/neon/include/asm/neon.h b/src/compat/neon/include/asm/neon.h
new file mode 100644
index 0000000..980d831
--- /dev/null
+++ b/src/compat/neon/include/asm/neon.h
@@ -0,0 +1,7 @@
+#ifndef _ARCH_ARM_ASM_NEON
+#define _ARCH_ARM_ASM_NEON
+#define kernel_neon_begin() \
+ BUILD_BUG_ON_MSG(1, "This kernel does not support ARM NEON")
+#define kernel_neon_end() \
+ BUILD_BUG_ON_MSG(1, "This kernel does not support ARM NEON")
+#endif