From b5efec00b671c5d7e9cb9e73a1d4925dd6ce8dcd Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Fri, 12 Mar 2021 12:50:47 +0000 Subject: powerpc/32s: Move KUEP locking/unlocking in C This can be done in C, do it. Unrolling the loop gains approx. 15% performance. From now on, prepare_transfer_to_handler() is only for interrupts from kernel. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4eadd873927e9a73c3d1dfe2f9497353465514cf.1615552867.git.christophe.leroy@csgroup.eu --- arch/powerpc/kernel/head_booke.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/powerpc/kernel/head_booke.h') diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index cb96ae002af6..f82470091697 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -105,7 +105,10 @@ END_BTB_FLUSH_SECTION .macro prepare_transfer_to_handler #ifdef CONFIG_E500 + andi. r12,r9,MSR_PR + bne 777f bl prepare_transfer_to_handler +777: #endif .endm -- cgit v1.2.3