Skip to content

Commit

Permalink
riscv: Add vector feature to compile
Browse files Browse the repository at this point in the history
This patch adds a new config option which could enable assembler's
vector feature.

Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
  • Loading branch information
guoren83 authored and intel-lab-lkp committed Nov 9, 2021
1 parent 4ef4ca8 commit b164ca1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/riscv/Kconfig
Expand Up @@ -389,6 +389,15 @@ config FPU

If you don't know what to do here, say Y.

config VECTOR
bool "VECTOR support"
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"
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/Makefile
Expand Up @@ -57,6 +57,7 @@ riscv-march-aflags-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-aflags-$(CONFIG_ARCH_RV64I) := rv64ima
riscv-march-aflags-$(CONFIG_FPU) := $(riscv-march-aflags-y)fd
riscv-march-aflags-$(CONFIG_RISCV_ISA_C) := $(riscv-march-aflags-y)c
riscv-march-aflags-$(CONFIG_VECTOR) := $(riscv-march-aflags-y)v

KBUILD_CFLAGS += -march=$(riscv-march-cflags-y)
KBUILD_AFLAGS += -march=$(riscv-march-aflags-y)
Expand Down

0 comments on commit b164ca1

Please sign in to comment.