[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f286c78682842079f4718af15f6a5c38ba289e51.1652257230.git.greentime.hu@sifive.com>
Date: Wed, 11 May 2022 08:31:14 +0000
From: Greentime Hu <greentime.hu@...ive.com>
To: palmer@...belt.com, paul.walmsley@...ive.com,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
aou@...s.berkeley.edu
Subject: [PATCH v10 04/16] riscv: Add vector feature to compile
From: Guo Ren <guoren@...ux.alibaba.com>
This patch adds a new config option which could enable assembler's
vector feature.
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Co-developed-by: Greentime Hu <greentime.hu@...ive.com>
Signed-off-by: Greentime Hu <greentime.hu@...ive.com>
---
arch/riscv/Kconfig | 10 ++++++++++
arch/riscv/Makefile | 1 +
2 files changed, 11 insertions(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 00fd9c548f26..f54f37cc746b 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -343,6 +343,16 @@ config FPU
If you don't know what to do here, say Y.
+config VECTOR
+ bool "VECTOR support"
+ depends on GCC_VERSION >= 120000 || CLANG_VERSION >= 130000
+ default n
+ help
+ Say N here if you want to disable all vector related procedure
+ in the kernel.
+
+ If you don't know what to do here, say Y.
+
endmenu
menu "Kernel features"
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 7d81102cffd4..1f19bdac6767 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -50,6 +50,7 @@ riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
+riscv-march-$(CONFIG_VECTOR) := $(riscv-march-y)v
# Newer binutils versions default to ISA spec version 20191213 which moves some
# instructions from the I extension to the Zicsr and Zifencei extensions.
--
2.17.1
Powered by blists - more mailing lists