diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-06-03 08:41:37 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-17 00:09:07 +1000 |
commit | 91bb30822a2e1d7900f9f42e9e92647a9015f979 (patch) | |
tree | 65b175ba7614d99c0cfe3a49a1f4504cca0d7e4a /arch/powerpc/include/asm/kup.h | |
parent | powerpc/32s: Move setup_{kuep/kuap}() into {kuep/kuap}.c (diff) | |
download | wireguard-linux-91bb30822a2e1d7900f9f42e9e92647a9015f979.tar.xz wireguard-linux-91bb30822a2e1d7900f9f42e9e92647a9015f979.zip |
powerpc/32s: Refactor update of user segment registers
KUEP implements the update of user segment registers.
Move it into mmu-hash.h in order to use it from other places.
And inline kuep_lock() and kuep_unlock(). Inlining kuep_lock() is
important for system_call_exception(), otherwise system_call_exception()
has to save into stack the system call parameters that are used just
after, and doing that takes more instructions than kuep_lock() itself.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/24591ca480d14a62ef910e38a5273d551262c4a2.1622708530.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/kup.h')
-rw-r--r-- | arch/powerpc/include/asm/kup.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h index ec96232529ac..4b94d4293777 100644 --- a/arch/powerpc/include/asm/kup.h +++ b/arch/powerpc/include/asm/kup.h @@ -46,10 +46,7 @@ void setup_kuep(bool disabled); static inline void setup_kuep(bool disabled) { } #endif /* CONFIG_PPC_KUEP */ -#if defined(CONFIG_PPC_KUEP) && defined(CONFIG_PPC_BOOK3S_32) -void kuep_lock(void); -void kuep_unlock(void); -#else +#ifndef CONFIG_PPC_BOOK3S_32 static inline void kuep_lock(void) { } static inline void kuep_unlock(void) { } #endif |