Re: [PATCH v3 5/5] riscv: vdso: Implement __vdso_futex_robust_try_unlock()

From: Thomas Weißschuh

Date: Mon Jul 20 2026 - 07:51:03 EST


On Mon, Jul 20, 2026 at 01:37:59PM +0200, Nam Cao wrote:
> Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx> writes:
> > Can it ever happen that the toolchain has differing zacas support between
> > 32-bit and 64-bit? Then cpu_supports_zacas() may not be sufficient.
>
> No idea. Probably not.
>
> But if it does differ, we will get a clear compile-time error message
> (unrecognized instruction or something like that). We can worry about it then.

I don't think we would get such an error currently.
The cc-option check in the Makefile will fall back to non-zacas for the
compat vDSO, but arch_futex_robust_unlock_get_pop() will treat it as zacas.


> > If it is guaranteed to be in sync I would prefer to reuse
> > CONFIG_TOOLCHAIN_HAS_ZACAS instead of the cc-option check in the Makefile
> > to make that clear and error out early if it should ever change.
>
> I intend to apply Vivian's .option suggestion. That won't be required then.

Ok. I don't understand the .option suggestion :-)

(...)


Thomas