]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths
authorNicholas Piggin <npiggin@gmail.com>
Tue, 13 Jun 2017 13:05:51 +0000 (23:05 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Jun 2017 09:46:29 +0000 (19:46 +1000)
commitf7f21d0e1838d75ab8876b5d38b95aa90d66bf18
tree3bda3145c64871a268c69e1ccb8b354e92e52c8b
parent4bc574fecbefa76424b8e6c6854b92e3dc5f6bbe
powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths

Idle code now always runs at the 0xc... effective address whether
in real or virtual mode. This means rfid can be ditched, along
with a lot of SRR manipulations.

In the wakeup path, carry SRR1 around in r12. Use mtmsrd to change
MSR states as required.

This also balances the return prediction for the idle call, by
doing blr rather than rfid to return to the idle caller.

On POWER9, 2-process context switch on different cores, with snooze
disabled, increases performance by 2%.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Incorporate v2 fixes from Nick]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/kvm/book3s_hv_rmhandlers.S