linux/arch/riscv/lib
Vivian Wang 1c7d491d86 riscv: checksum: Use riscv_has_extension_likely
Use riscv_has_extension_likely() to check for RISCV_ISA_EXT_ZBB,
replacing the use of asm goto with ALTERNATIVE.

The "likely" variant is used to match the behavior of the original
implementation using ALTERNATIVE("j %l[no_zbb]", "nop", ...).

While we're at it, also remove bogus comment about Zbb being likely
available. We have to choose between "likely" and "unlikely" due to
limitations of the asm goto feature, but that does not mean we should
put a bad comment on why we pick "likely" over "unlikely".

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Link: https://patch.msgid.link/20251020-riscv-altn-helper-wip-v4-2-ef941c87669a@iscas.ac.cn
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2025-11-19 09:19:27 -07:00
..
Makefile Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
clear_page.S use linux/export.h rather than asm-generic/export.h 2024-01-09 20:10:40 -08:00
csum.c riscv: checksum: Use riscv_has_extension_likely 2025-11-19 09:19:27 -07:00
delay.c include/linux/delay.h: replace kernel.h with the necessary inclusions 2021-11-09 10:02:49 -08:00
error-inject.c riscv: Add support for function error injection 2021-01-14 15:09:09 -08:00
memcpy.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
memmove.S riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
memset.S RISC-V: lib: Add pi aliases for string functions 2024-08-05 12:06:39 -07:00
riscv_v_helpers.c riscv: make unsafe user copy routines use existing assembly routines 2025-06-05 11:39:15 -07:00
strcmp.S RISC-V: separate Zbb optimisations requiring and not requiring toolchain support 2025-03-18 08:53:02 +00:00
strlen.S RISC-V: separate Zbb optimisations requiring and not requiring toolchain support 2025-03-18 08:53:02 +00:00
strncmp.S RISC-V: separate Zbb optimisations requiring and not requiring toolchain support 2025-03-18 08:53:02 +00:00
tishift.S use linux/export.h rather than asm-generic/export.h 2024-01-09 20:10:40 -08:00
uaccess.S riscv: make unsafe user copy routines use existing assembly routines 2025-06-05 11:39:15 -07:00
uaccess_vector.S riscv: make unsafe user copy routines use existing assembly routines 2025-06-05 11:39:15 -07:00
xor.S riscv: Add vector extension XOR implementation 2024-01-16 07:13:55 -08:00