diff mbox series

riscv: Fix toolchain vector detection

Message ID 20240819001131.1738806-1-antonb@tenstorrent.com (mailing list archive)
State Accepted
Commit 5ba7a75a53dffbf727e842b5847859bb482ac4aa
Headers show
Series riscv: Fix toolchain vector detection | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Anton Blanchard Aug. 19, 2024, 12:11 a.m. UTC
A recent change to gcc flags rv64iv as no longer valid:

   cc1: sorry, unimplemented: Currently the 'V' implementation
   requires the 'M' extension

and as a result vector support is disabled. Fix this by adding m
to our toolchain vector detection code.

Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
---
 arch/riscv/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Conor Dooley Aug. 19, 2024, 4:45 p.m. UTC | #1
On Mon, Aug 19, 2024 at 12:11:31AM +0000, Anton Blanchard wrote:
> A recent change to gcc flags rv64iv as no longer valid:
> 
>    cc1: sorry, unimplemented: Currently the 'V' implementation
>    requires the 'M' extension
> 
> and as a result vector support is disabled. Fix this by adding m
> to our toolchain vector detection code.
> 
> Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>

This one definitely needs a cc: stable, it's required as far back as
6.6, right?

> ---
>  arch/riscv/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 0f3cd7c3a436..939ea7f6a228 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -552,8 +552,8 @@ config RISCV_ISA_SVPBMT
>  config TOOLCHAIN_HAS_V
>  	bool
>  	default y
> -	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
> -	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
> +	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
> +	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
>  	depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
>  	depends on AS_HAS_OPTION_ARCH
>  
> -- 
> 2.34.1
> 
>
Alexandre Ghiti Aug. 26, 2024, 11:50 a.m. UTC | #2
Hi Anton,

On 19/08/2024 02:11, Anton Blanchard wrote:
> A recent change to gcc flags rv64iv as no longer valid:
>
>     cc1: sorry, unimplemented: Currently the 'V' implementation
>     requires the 'M' extension
>
> and as a result vector support is disabled. Fix this by adding m
> to our toolchain vector detection code.
>
> Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
> ---
>   arch/riscv/Kconfig | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 0f3cd7c3a436..939ea7f6a228 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -552,8 +552,8 @@ config RISCV_ISA_SVPBMT
>   config TOOLCHAIN_HAS_V
>   	bool
>   	default y
> -	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
> -	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
> +	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
> +	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
>   	depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
>   	depends on AS_HAS_OPTION_ARCH
>   


As Conor noted, we need to backport this to stable releases so here is a 
Fixes tag:

Fixes: fa8e7cce55da ("riscv: Enable Vector code to be built")

Thanks,

Alex
patchwork-bot+linux-riscv@kernel.org Sept. 3, 2024, 7:10 p.m. UTC | #3
Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Mon, 19 Aug 2024 00:11:31 +0000 you wrote:
> A recent change to gcc flags rv64iv as no longer valid:
> 
>    cc1: sorry, unimplemented: Currently the 'V' implementation
>    requires the 'M' extension
> 
> and as a result vector support is disabled. Fix this by adding m
> to our toolchain vector detection code.
> 
> [...]

Here is the summary with links:
  - riscv: Fix toolchain vector detection
    https://git.kernel.org/riscv/c/5ba7a75a53df

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0f3cd7c3a436..939ea7f6a228 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -552,8 +552,8 @@  config RISCV_ISA_SVPBMT
 config TOOLCHAIN_HAS_V
 	bool
 	default y
-	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
-	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
+	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64imv)
+	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32imv)
 	depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
 	depends on AS_HAS_OPTION_ARCH