]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/syscall: Avoid storing 'current' in another pointer
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 10 Feb 2021 08:44:09 +0000 (08:44 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:35:13 +0000 (23:35 +1100)
commit5b90b9661a3396e00f6e8bcbb617a0787fb683d0
tree8aca57352d6e9e8138b62804c364d0fa0fdbaf62
parentd524dda719f06967db4d3ba519edf9267f84c155
powerpc/syscall: Avoid storing 'current' in another pointer

By saving the pointer pointing to thread_info.flags, gcc copies r2
in a non-volatile register.

We know 'current' doesn't change, so avoid that intermediaite pointer.

Reduces null_syscall benchmark by 2 cycles (322 => 320 cycles)

On PPC64, gcc seems to know that 'current' is not changing, and it keeps
it in a non volatile register to avoid multiple read of 'current' in paca.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ad0363ff0ff8c125f40e1cdc589a85bbd7e31693.1612946484.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/interrupt.c