powerpc/kuap: Use ASM feature fixups instead of static branches
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 11 Jul 2023 15:59:21 +0000 (17:59 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Aug 2023 12:22:18 +0000 (22:22 +1000)
commit3a24ea0df83e32355d897a18bbd82e05986dcdc3
tree7475f41263f21546c960ad4e10d26d2fa12a5c59
parenteb52f66f0abd468caf8be4e690d7fdef96250c2f
powerpc/kuap: Use ASM feature fixups instead of static branches

To avoid a useless nop on top of every uaccess enable/disable and
make life easier for objtool, replace static branches by ASM feature
fixups that will nop KUAP enabling instructions out in the unlikely
case KUAP is disabled at boottime.

Leave it as is on book3s/64 for now, it will be handled later when
objtool is activated on PPC64.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/671948788024fd890ec4ed175bc332dab8664ea5.1689091022.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/book3s/32/kup.h
arch/powerpc/include/asm/kup.h
arch/powerpc/include/asm/nohash/32/kup-8xx.h
arch/powerpc/include/asm/nohash/kup-booke.h
arch/powerpc/mm/nohash/kup.c