From dcb765a453fa22e4195bc42de1792567fe511c67 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 6 Sep 2018 20:44:55 -0600 Subject: compat: support neon.h on old kernels Reported-by: Philipp Richter --- src/compat/Kbuild.include | 7 +++++++ src/compat/neon/include/asm/neon.h | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/compat/neon/include/asm/neon.h (limited to 'src') 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 -- cgit v1.2.3-59-g8ed1b