[PATCH v3 4/5] riscv: compat_vdso: Build with zacas if available
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 17 05:23:56 PDT 2026
On Fri, Jul 17, 2026 at 10:06:37AM +0200, Nam Cao wrote:
> The compat vdso Makefile does not enable zacas, disallowing source
> files from using zacas instructions. This is an obstacle to adding
> robust __vdso_futex_robust_list32_try_unlock() in a follow-up commit.
"obstacle" is a bit hard. It prevents using the optimized variant.
> Build with zacas, if compiler supports it.
>
> Signed-off-by: Nam Cao <namcao at linutronix.de>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
> ---
> arch/riscv/kernel/compat_vdso/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/riscv/kernel/compat_vdso/Makefile b/arch/riscv/kernel/compat_vdso/Makefile
> index 63580b33e3ce..ffbf84aeb081 100644
> --- a/arch/riscv/kernel/compat_vdso/Makefile
> +++ b/arch/riscv/kernel/compat_vdso/Makefile
> @@ -18,6 +18,10 @@ else
> COMPAT_MARCH := rv32imafd
> endif
>
> +ifneq ($(call cc-option,-mabi=ilp32 -march=rv32ima_zacas),)
> +COMPAT_MARCH := $(COMPAT_MARCH)_zacas
> +endif
Could be :
ifeq ($(call cc-option-yn,-mabi=ilp32 -march=rv32ima_zacas),y)
> +
> COMPAT_CC_FLAGS := -march=$(COMPAT_MARCH) -mabi=ilp32
>
> COMPAT_LD_FLAGS := -melf32lriscv
> --
> 2.47.3
>
More information about the linux-riscv
mailing list