arm64: neon: replace generic definition of may_use_simd()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 3 Aug 2017 16:23:19 +0000 (17:23 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Aug 2017 14:00:47 +0000 (15:00 +0100)
In preparation of modifying the logic that decides whether kernel mode
NEON is allowable, which is required for SVE support, introduce an
implementation of may_use_simd() that reflects the current reality, i.e.,
that SIMD is allowed in any context.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/Kbuild
arch/arm64/include/asm/simd.h [new file with mode: 0644]

index f81c7b685fc6f3ee2dc7d15fdf31924d06e396ba..2326e39d58929e3c7d10ce94579e5a4a34901e36 100644 (file)
@@ -20,7 +20,6 @@ generic-y += rwsem.h
 generic-y += segment.h
 generic-y += serial.h
 generic-y += set_memory.h
-generic-y += simd.h
 generic-y += sizes.h
 generic-y += switch_to.h
 generic-y += trace_clock.h
diff --git a/arch/arm64/include/asm/simd.h b/arch/arm64/include/asm/simd.h
new file mode 100644 (file)
index 0000000..96959b5
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 Linaro Ltd. <ard.biesheuvel@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#ifndef __ASM_SIMD_H
+#define __ASM_SIMD_H
+
+#include <linux/types.h>
+
+/*
+ * may_use_simd - whether it is allowable at this time to issue SIMD
+ *                instructions or access the SIMD register file
+ */
+static __must_check inline bool may_use_simd(void)
+{
+       return true;
+}
+
+#endif