Unverified Commit d5a7fab7 authored by Samuel Holland's avatar Samuel Holland Committed by Palmer Dabbelt
Browse files

riscv: Fix Zbb alternative IDs



Commit 4bf88607 ("riscv: cpufeature: extend
riscv_cpufeature_patch_func to all ISA extensions") switched ISA
extension alternatives to use the RISCV_ISA_EXT_* macros instead of
CPUFEATURE_*. This was mismerged when applied on top of the Zbb series,
so the Zbb alternatives referenced the wrong errata ID values.

Fixes: 9daca9a5 ("Merge patch series "riscv: improve boot time isa extensions handling"")
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
Tested-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230212021534.59121-3-samuel@sholland.org


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent bfd6fc5d
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -23,11 +23,6 @@
#define	ERRATA_THEAD_NUMBER 3
#endif

#define	CPUFEATURE_SVPBMT 0
#define	CPUFEATURE_ZICBOM 1
#define	CPUFEATURE_ZBB 2
#define	CPUFEATURE_NUMBER 3

#ifdef __ASSEMBLY__

#define ALT_INSN_FAULT(x)						\
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
/* int strcmp(const char *cs, const char *ct) */
SYM_FUNC_START(strcmp)

	ALTERNATIVE("nop", "j strcmp_zbb", 0, CPUFEATURE_ZBB, CONFIG_RISCV_ISA_ZBB)
	ALTERNATIVE("nop", "j strcmp_zbb", 0, RISCV_ISA_EXT_ZBB, CONFIG_RISCV_ISA_ZBB)

	/*
	 * Returns
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
/* int strlen(const char *s) */
SYM_FUNC_START(strlen)

	ALTERNATIVE("nop", "j strlen_zbb", 0, CPUFEATURE_ZBB, CONFIG_RISCV_ISA_ZBB)
	ALTERNATIVE("nop", "j strlen_zbb", 0, RISCV_ISA_EXT_ZBB, CONFIG_RISCV_ISA_ZBB)

	/*
	 * Returns
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
/* int strncmp(const char *cs, const char *ct, size_t count) */
SYM_FUNC_START(strncmp)

	ALTERNATIVE("nop", "j strncmp_zbb", 0, CPUFEATURE_ZBB, CONFIG_RISCV_ISA_ZBB)
	ALTERNATIVE("nop", "j strncmp_zbb", 0, RISCV_ISA_EXT_ZBB, CONFIG_RISCV_ISA_ZBB)

	/*
	 * Returns