]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: Optimise MSR handling in exception handling
authorNicholas Piggin <npiggin@gmail.com>
Thu, 15 Sep 2016 09:04:46 +0000 (19:04 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 20 Sep 2016 05:56:45 +0000 (15:56 +1000)
commit1c1ce102c007e9fa68d44911059d767767a5de39
tree9c8bb1a0c748924d1f6072de09d17357834a3941
parente2cd278c87bd642c816a2b6f6a4ad27cec3cd1ea
powerpc/64s: Optimise MSR handling in exception handling

mtmsrd with L=1 only affects MSR_EE and MSR_RI bits, and we always
know what state those bits are, so the kernel MSR does not need to be
loaded when modifying them.

mtmsrd is often in the critical execution path, so avoiding dependency
on even L1 load is noticable. On a POWER8 this saves about 3 cycles
from the syscall path, and possibly a few from other exception returns
(not measured).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/entry_64.S