riscv: Make sure toolchain supports zba before using zba instructions
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Fri, 28 Mar 2025 11:54:22 +0000 (12:54 +0100)
committerAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 1 Apr 2025 07:07:13 +0000 (07:07 +0000)
commit8a2f20ac8e14c1dd29d3214016a27e244f266b39
tree9203e5629b74d4fb089dd50b7e397388259517e3
parent3f7023171df43641a8a8a1c9a12124501e589010
riscv: Make sure toolchain supports zba before using zba instructions

Old toolchain like gcc 8.5.0 does not support zba, so we must check that
the toolchain supports this extension before using it in the kernel.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503281836.8pntHm6I-lkp@intel.com/
Link: https://lore.kernel.org/r/20250328115422.253670-1-alexghiti@rivosinc.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/runtime-const.h