[PATCH 3/4] powerpc: Runtime selection between sc and scv for syscalls

Florian Weimer fw@deneb.enyo.de
Wed Nov 18 15:16:20 GMT 2020


* Matheus Castanho via Libc-alpha:

> +/* Check PPC_FEATURE2_SCV bit from hwcap2 in the TCB and update CR0
> + * accordingly.  First, we check if the thread pointer != 0, so we don't try to
> + * access the TCB before it has been initialized, e.g. inside the dynamic
> + * loader.  If it is already initialized, check if scv is available.  On both
> + * negative cases, go to JUMPFALSE (label given by the macro's caller).  We
> + * save the value we read from the TCB in a non-volatile register so we can
> + * reuse it later when exiting from the syscall in PSEUDO_RET.  */

This comment style is not GNU (sorry).

I think you can avoid the conditional check and replace it with #if
IS_IN (rtld).  Then ld.so will use the old interface unconditionally,
but that should be okay.


More information about the Libc-alpha mailing list