Messages in this thread Patch in this message | | | From | Christophe Leroy <> | Subject | [PATCH v2 38/43] powerpc/32: Only use prepare_transfer_to_handler function on book3s/32 and e500 | Date | Tue, 9 Mar 2021 12:10:04 +0000 (UTC) |
| |
Only book3s/32 and e500 have significative work to do in prepare_transfer_to_handler.
Other 32 bit have nothing to do at all.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/kernel/entry_32.S | 6 ++---- arch/powerpc/kernel/head_32.h | 2 ++ arch/powerpc/kernel/head_booke.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 5cfa10816261..9c333e6db5fa 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -48,6 +48,7 @@ */ .align 12 +#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500) .globl prepare_transfer_to_handler prepare_transfer_to_handler: andi. r0,r9,MSR_PR @@ -61,15 +62,12 @@ prepare_transfer_to_handler: /* if from kernel, check interrupted DOZE/NAP mode */ 2: kuap_save_and_lock r11, r12, r9, r5, r6 -#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500) lwz r12,TI_LOCAL_FLAGS(r2) mtcrf 0x01,r12 bt- 31-TLF_NAPPING,4f bt- 31-TLF_SLEEPING,7f -#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */ blr -#if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500) 4: rlwinm r12,r12,0,~_TLF_NAPPING stw r12,TI_LOCAL_FLAGS(r2) b power_save_ppc32_restore @@ -80,8 +78,8 @@ prepare_transfer_to_handler: rlwinm r9,r9,0,~MSR_EE stw r9,_MSR(r11) b fast_exception_return -#endif _ASM_NOKPROBE_SYMBOL(prepare_transfer_to_handler) +#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */ .globl transfer_to_syscall transfer_to_syscall: diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index 267479072495..ca303762d8cc 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -132,7 +132,9 @@ _ASM_NOKPROBE_SYMBOL(\name\()_virt) .endm .macro prepare_transfer_to_handler +#ifdef CONFIG_PPC_BOOK3S_32 bl prepare_transfer_to_handler +#endif .endm .macro SYSCALL_ENTRY trapno diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 4d583fbef0b6..a2565023d2d0 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -92,7 +92,9 @@ END_BTB_FLUSH_SECTION .endm .macro prepare_transfer_to_handler +#ifdef CONFIG_E500 bl prepare_transfer_to_handler +#endif .endm .macro SYSCALL_ENTRY trapno intno srr1 -- 2.25.0
| |