powerpc/32s: Speed up likely path of kuap_update_sr()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 6 May 2021 13:27:31 +0000 (13:27 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 17 May 2021 05:27:16 +0000 (15:27 +1000)
commit8af8d72dc58e90dc945ca627b24968400e0f21b6
treed218e8689bf2b4700c760216547f137b1f56ccda
parent0441729e16379649ea0f393a5be68a19ba384d94
powerpc/32s: Speed up likely path of kuap_update_sr()

In most cases, kuap_update_sr() will update a single segment
register.

We know that first update will always be done, if there is no
segment register to update at all, kuap_update_sr() is not
called.

Avoid recurring calculations and tests in that case.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/848f18d213b8341939add7302dc4ef80cc7a12e3.1620307636.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/book3s/32/kup.h