linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang
@ 2024-01-27  9:00 Eric Biggers
  2024-01-27 19:52 ` Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Biggers @ 2024-01-27  9:00 UTC (permalink / raw)
  To: linux-riscv; +Cc: linux-crypto, llvm, Brandon Wu, Nathan Chancellor

From: Eric Biggers <ebiggers@google.com>

LLVM commit 8e01042da9d3 ("[RISCV] Add missing dependency check for Zvkb
(#79467)") broke the check used by the TOOLCHAIN_HAS_VECTOR_CRYPTO
kconfig symbol because it made zvkb start depending on v or zve*.  Fix
this by specifying both v and zvkb when checking for support for zvkb.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index b49016bb5077b..912fff31492b9 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -581,21 +581,21 @@ config TOOLCHAIN_HAS_ZBB
 	default y
 	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
 	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
 	depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
 	depends on AS_HAS_OPTION_ARCH
 
 # This symbol indicates that the toolchain supports all v1.0 vector crypto
 # extensions, including Zvk*, Zvbb, and Zvbc.  LLVM added all of these at once.
 # binutils added all except Zvkb, then added Zvkb.  So we just check for Zvkb.
 config TOOLCHAIN_HAS_VECTOR_CRYPTO
-	def_bool $(as-instr, .option arch$(comma) +zvkb)
+	def_bool $(as-instr, .option arch$(comma) +v$(comma) +zvkb)
 	depends on AS_HAS_OPTION_ARCH
 
 config RISCV_ISA_ZBB
 	bool "Zbb extension support for bit manipulation instructions"
 	depends on TOOLCHAIN_HAS_ZBB
 	depends on MMU
 	depends on RISCV_ALTERNATIVE
 	default y
 	help
 	   Adds support to dynamically detect the presence of the ZBB

base-commit: cb4ede926134a65bc3bf90ed58dace8451d7e759
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang
  2024-01-27  9:00 [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Eric Biggers
@ 2024-01-27 19:52 ` Nathan Chancellor
  2024-01-29 15:49 ` Conor Dooley
  2024-02-28 21:00 ` patchwork-bot+linux-riscv
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2024-01-27 19:52 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-riscv, linux-crypto, llvm, Brandon Wu

On Sat, Jan 27, 2024 at 01:00:54AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> LLVM commit 8e01042da9d3 ("[RISCV] Add missing dependency check for Zvkb
> (#79467)") broke the check used by the TOOLCHAIN_HAS_VECTOR_CRYPTO
> kconfig symbol because it made zvkb start depending on v or zve*.  Fix
> this by specifying both v and zvkb when checking for support for zvkb.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

I also verified this does not regress GCC.

> ---
>  arch/riscv/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index b49016bb5077b..912fff31492b9 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -581,21 +581,21 @@ config TOOLCHAIN_HAS_ZBB
>  	default y
>  	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
>  	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
>  	depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
>  	depends on AS_HAS_OPTION_ARCH
>  
>  # This symbol indicates that the toolchain supports all v1.0 vector crypto
>  # extensions, including Zvk*, Zvbb, and Zvbc.  LLVM added all of these at once.
>  # binutils added all except Zvkb, then added Zvkb.  So we just check for Zvkb.
>  config TOOLCHAIN_HAS_VECTOR_CRYPTO
> -	def_bool $(as-instr, .option arch$(comma) +zvkb)
> +	def_bool $(as-instr, .option arch$(comma) +v$(comma) +zvkb)
>  	depends on AS_HAS_OPTION_ARCH
>  
>  config RISCV_ISA_ZBB
>  	bool "Zbb extension support for bit manipulation instructions"
>  	depends on TOOLCHAIN_HAS_ZBB
>  	depends on MMU
>  	depends on RISCV_ALTERNATIVE
>  	default y
>  	help
>  	   Adds support to dynamically detect the presence of the ZBB
> 
> base-commit: cb4ede926134a65bc3bf90ed58dace8451d7e759
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang
  2024-01-27  9:00 [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Eric Biggers
  2024-01-27 19:52 ` Nathan Chancellor
@ 2024-01-29 15:49 ` Conor Dooley
  2024-02-28 21:00 ` patchwork-bot+linux-riscv
  2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-01-29 15:49 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-riscv, linux-crypto, llvm, Brandon Wu, Nathan Chancellor

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Sat, Jan 27, 2024 at 01:00:54AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> LLVM commit 8e01042da9d3 ("[RISCV] Add missing dependency check for Zvkb
> (#79467)") broke the check used by the TOOLCHAIN_HAS_VECTOR_CRYPTO
> kconfig symbol because it made zvkb start depending on v or zve*.  Fix
> this by specifying both v and zvkb when checking for support for zvkb.

Seems like a reasonable change on the part of LLVM.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  arch/riscv/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index b49016bb5077b..912fff31492b9 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -581,21 +581,21 @@ config TOOLCHAIN_HAS_ZBB
>  	default y
>  	depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
>  	depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
>  	depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
>  	depends on AS_HAS_OPTION_ARCH
>  
>  # This symbol indicates that the toolchain supports all v1.0 vector crypto
>  # extensions, including Zvk*, Zvbb, and Zvbc.  LLVM added all of these at once.
>  # binutils added all except Zvkb, then added Zvkb.  So we just check for Zvkb.
>  config TOOLCHAIN_HAS_VECTOR_CRYPTO
> -	def_bool $(as-instr, .option arch$(comma) +zvkb)
> +	def_bool $(as-instr, .option arch$(comma) +v$(comma) +zvkb)
>  	depends on AS_HAS_OPTION_ARCH
>  
>  config RISCV_ISA_ZBB
>  	bool "Zbb extension support for bit manipulation instructions"
>  	depends on TOOLCHAIN_HAS_ZBB
>  	depends on MMU
>  	depends on RISCV_ALTERNATIVE
>  	default y
>  	help
>  	   Adds support to dynamically detect the presence of the ZBB
> 
> base-commit: cb4ede926134a65bc3bf90ed58dace8451d7e759
> -- 
> 2.43.0
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang
  2024-01-27  9:00 [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Eric Biggers
  2024-01-27 19:52 ` Nathan Chancellor
  2024-01-29 15:49 ` Conor Dooley
@ 2024-02-28 21:00 ` patchwork-bot+linux-riscv
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-02-28 21:00 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-riscv, linux-crypto, llvm, brandon.wu, nathan

Hello:

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

On Sat, 27 Jan 2024 01:00:54 -0800 you wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> LLVM commit 8e01042da9d3 ("[RISCV] Add missing dependency check for Zvkb
> (#79467)") broke the check used by the TOOLCHAIN_HAS_VECTOR_CRYPTO
> kconfig symbol because it made zvkb start depending on v or zve*.  Fix
> this by specifying both v and zvkb when checking for support for zvkb.
> 
> [...]

Here is the summary with links:
  - RISC-V: fix check for zvkb with tip-of-tree clang
    https://git.kernel.org/riscv/c/886516fae2b7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-28 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-27  9:00 [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Eric Biggers
2024-01-27 19:52 ` Nathan Chancellor
2024-01-29 15:49 ` Conor Dooley
2024-02-28 21:00 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).