From: Dave.Martin@arm.com (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v4 1/5] arm64: neon: replace generic definition of may_use_simd()
Date: Fri, 28 Jul 2017 14:50:20 +0100 [thread overview]
Message-ID: <1501249824-18913-2-git-send-email-Dave.Martin@arm.com> (raw)
In-Reply-To: <1501249824-18913-1-git-send-email-Dave.Martin@arm.com>
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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>
---
arch/arm64/include/asm/Kbuild | 1 -
arch/arm64/include/asm/simd.h | 23 +++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/include/asm/simd.h
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild
index f81c7b6..2326e39 100644
--- a/arch/arm64/include/asm/Kbuild
+++ b/arch/arm64/include/asm/Kbuild
@@ -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
index 0000000..96959b5
--- /dev/null
+++ b/arch/arm64/include/asm/simd.h
@@ -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
--
2.1.4
next prev parent reply other threads:[~2017-07-28 13:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 13:50 [RFC PATCH v4 0/5] Simplify kernel-mode NEON Dave Martin
2017-07-28 13:50 ` Dave Martin [this message]
2017-07-28 13:50 ` [RFC PATCH v4 2/5] arm64: neon: Add missing header guard in <asm/neon.h> Dave Martin
2017-07-28 13:50 ` [RFC PATCH v4 3/5] arm64: fpsimd: Consistently use __this_cpu_ ops where appropriate Dave Martin
2017-07-28 13:50 ` [RFC PATCH v4 4/5] arm64: neon: Remove support for nested or hardirq kernel-mode NEON Dave Martin
2017-08-02 10:02 ` Catalin Marinas
2017-08-02 13:00 ` Dave Martin
2017-08-02 14:31 ` Catalin Marinas
2017-07-28 13:50 ` [RFC PATCH v4 5/5] arm64: neon: Allow EFI runtime services to use FPSIMD in irq context Dave Martin
2017-07-28 14:02 ` [PATCH] squash! " Dave Martin
2017-08-02 14:58 ` [RFC PATCH v4 5/5] " Catalin Marinas
2017-08-02 15:15 ` Dave Martin
2017-08-02 16:02 ` Catalin Marinas
2017-08-02 16:19 ` Dave Martin
2017-08-01 12:15 ` [RFC PATCH v4 0/5] Simplify kernel-mode NEON Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501249824-18913-2-git-send-email-Dave.Martin@arm.com \
--to=dave.martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.