Skip to content

Commit

Permalink
RISC-V: remove toolchain version checks for Zicbom
Browse files Browse the repository at this point in the history
Commit b8c8687 ("riscv: fix detection of toolchain Zicbom
support") fixed building on systems where Zicbom was supported by the
compiler/assembler but not by the linker in an easily backportable
manner.
Now that the we have insn-defs for the 3 instructions, toolchain support
is no longer required for Zicbom.
Stop emitting "_zicbom" in -march when Zicbom is enabled & drop the
version checks entirely.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230108163356.3063839-4-conor@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
ConchuOD authored and palmer-dabbelt committed Feb 15, 2023
1 parent dd23e95 commit 75c5390
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -416,16 +416,8 @@ config RISCV_ISA_SVPBMT

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

config TOOLCHAIN_HAS_ZICBOM
bool
default y
depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
depends on LLD_VERSION >= 150000 || LD_VERSION >= 23800

config RISCV_ISA_ZICBOM
bool "Zicbom extension support for non-coherent DMA operation"
depends on TOOLCHAIN_HAS_ZICBOM
depends on !XIP_KERNEL && MMU
select RISCV_DMA_NONCOHERENT
select RISCV_ALTERNATIVE
Expand Down
3 changes: 0 additions & 3 deletions arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei

# Check if the toolchain supports Zicbom extension
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZICBOM) := $(riscv-march-y)_zicbom

# Check if the toolchain supports Zihintpause extension
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause

Expand Down

0 comments on commit 75c5390

Please sign in to comment.