]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
riscv: bitops: Use riscv_has_extension_likely
authorVivian Wang <wangruikang@iscas.ac.cn>
Tue, 18 Nov 2025 04:19:22 +0000 (21:19 -0700)
committerPaul Walmsley <pjw@kernel.org>
Wed, 19 Nov 2025 16:19:28 +0000 (09:19 -0700)
commit6b85e9ac4a25c5e69f8121e95eea14da6e3df2fa
tree99f058ee03bcb663f1d5c267db39c51e3e457412
parent8261a9d167e8b3007c0e830a1f7ab8c8b8c24b79
riscv: bitops: 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[legacy]", "nop", ...).

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Link: https://patch.msgid.link/20251020-riscv-altn-helper-wip-v4-4-ef941c87669a@iscas.ac.cn
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/bitops.h