[PATCH] powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread

Nicholas Piggin npiggin at gmail.com
Sun Jun 14 19:24:18 AEST 2020


Excerpts from Christophe Leroy's message of June 11, 2020 10:26 pm:
> 
> 
> Le 11/06/2020 à 14:11, Nicholas Piggin a écrit :
>> blrl is not recommended to use as an indirect function call, as it may
>> corrupt the link stack predictor.
>> 
>> This is not a performance critical path but this should be fixed for
>> consistency.
> 
> There's exactly the same in entry_32.S
> Should it be changed there too ... for consistency :) ?
> 
> ppc32 also uses blrl for calling syscall handler, should it be changed 
> as well ?

Yes I would say so. I don't know much about 32-bit implementations but
MPC7450 at least has a link stack predictor.

Thanks,
Nick


More information about the Linuxppc-dev mailing list