Subject: Re: powerpc/64s: optimise syscall entry for virtual, relocatable case

From: Michael Ellerman <[email-masked]>
Date: Tue, 20 Sep 2016 23:07:22 +1000 (AEST)

On Thu, 2016-15-09 at 09:03:21 UTC, Nicholas Piggin wrote:
> The mflr r10 instruction was left over saving of lr when the code used
> lr to branch to system_call_entry from the exception handler. That was
> changed by 6a404806d to use the count register. The value is never used
> now, so mflr can be removed, and r10 can be used for storage rather than
> spilling to the SPR scratch register.
> 
> The scratch register spill causes a long pipeline stall due to the SPR
> read after write. This change brings getppid syscall cost from 406 to
> 376 cycles on POWER8. getppid for non-relocatable case is 371 cycles.
> 
> Signed-off-by: Nicholas Piggin <[email-masked]>
> Acked-by: Balbir Singh <[email-masked]>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/18e3f56b1cacb96017e2a66844

cheers