[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mhng-e9e08b2d-bb86-43e5-9975-bb497350e770@palmer-ri-x1c9>
Date: Tue, 14 Dec 2021 08:29:24 -0800 (PST)
From: Palmer Dabbelt <palmer@...belt.com>
To: greentime.hu@...ive.com
CC: Paul Walmsley <paul.walmsley@...ive.com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
aou@...s.berkeley.edu
Subject: Re: [PATCH v9 05/17] riscv: Add vector feature to compile
On Tue, 09 Nov 2021 01:48:17 PST (-0800), greentime.hu@...ive.com wrote:
> From: Guo Ren <guoren@...ux.alibaba.com>
>
> This patch adds a new config option which could enable assembler's
> vector feature.
>
> Signed-off-by: Greentime Hu <greentime.hu@...ive.com>
> Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> Reviewed-by: Greentime Hu <greentime.hu@...ive.com>
> ---
> arch/riscv/Kconfig | 9 +++++++++
> arch/riscv/Makefile | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index f076cee11af6..0311579920b9 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -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
As the kernel build robot points out, this should have some sort of
dependency on a vector toolchain. Not sure if there's a better way to
do it that cc-option, looks like there are some other tests for
assembler arguments that way.
>
> menu "Kernel features"
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 37de70df4fae..f109214a2d7f 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -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)
Powered by blists - more mailing lists