mirror of https://gitee.com/openkylin/linux.git
powerpc/32: Only use prepare_transfer_to_handler function on book3s/32 and e500
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> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b5e29ca0e557c11340415a13fe8b107189d315e1.1615552867.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
a5d33be051
commit
a2b3e09ae4
|
@ -48,6 +48,7 @@
|
||||||
*/
|
*/
|
||||||
.align 12
|
.align 12
|
||||||
|
|
||||||
|
#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
|
||||||
.globl prepare_transfer_to_handler
|
.globl prepare_transfer_to_handler
|
||||||
prepare_transfer_to_handler:
|
prepare_transfer_to_handler:
|
||||||
andi. r12,r9,MSR_PR
|
andi. r12,r9,MSR_PR
|
||||||
|
@ -61,15 +62,12 @@ prepare_transfer_to_handler:
|
||||||
/* if from kernel, check interrupted DOZE/NAP mode */
|
/* if from kernel, check interrupted DOZE/NAP mode */
|
||||||
2:
|
2:
|
||||||
kuap_save_and_lock r11, r12, r9, r5, r6
|
kuap_save_and_lock r11, r12, r9, r5, r6
|
||||||
#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
|
|
||||||
lwz r12,TI_LOCAL_FLAGS(r2)
|
lwz r12,TI_LOCAL_FLAGS(r2)
|
||||||
mtcrf 0x01,r12
|
mtcrf 0x01,r12
|
||||||
bt- 31-TLF_NAPPING,4f
|
bt- 31-TLF_NAPPING,4f
|
||||||
bt- 31-TLF_SLEEPING,7f
|
bt- 31-TLF_SLEEPING,7f
|
||||||
#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
|
|
||||||
blr
|
blr
|
||||||
|
|
||||||
#if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
|
|
||||||
4: rlwinm r12,r12,0,~_TLF_NAPPING
|
4: rlwinm r12,r12,0,~_TLF_NAPPING
|
||||||
stw r12,TI_LOCAL_FLAGS(r2)
|
stw r12,TI_LOCAL_FLAGS(r2)
|
||||||
b power_save_ppc32_restore
|
b power_save_ppc32_restore
|
||||||
|
@ -82,8 +80,8 @@ prepare_transfer_to_handler:
|
||||||
kuap_restore r11, r2, r3, r4, r5
|
kuap_restore r11, r2, r3, r4, r5
|
||||||
lwz r2, GPR2(r11)
|
lwz r2, GPR2(r11)
|
||||||
b fast_exception_return
|
b fast_exception_return
|
||||||
#endif
|
|
||||||
_ASM_NOKPROBE_SYMBOL(prepare_transfer_to_handler)
|
_ASM_NOKPROBE_SYMBOL(prepare_transfer_to_handler)
|
||||||
|
#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
|
||||||
|
|
||||||
.globl transfer_to_syscall
|
.globl transfer_to_syscall
|
||||||
transfer_to_syscall:
|
transfer_to_syscall:
|
||||||
|
|
|
@ -132,7 +132,9 @@ _ASM_NOKPROBE_SYMBOL(\name\()_virt)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro prepare_transfer_to_handler
|
.macro prepare_transfer_to_handler
|
||||||
|
#ifdef CONFIG_PPC_BOOK3S_32
|
||||||
bl prepare_transfer_to_handler
|
bl prepare_transfer_to_handler
|
||||||
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro SYSCALL_ENTRY trapno
|
.macro SYSCALL_ENTRY trapno
|
||||||
|
|
|
@ -104,7 +104,9 @@ END_BTB_FLUSH_SECTION
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro prepare_transfer_to_handler
|
.macro prepare_transfer_to_handler
|
||||||
|
#ifdef CONFIG_E500
|
||||||
bl prepare_transfer_to_handler
|
bl prepare_transfer_to_handler
|
||||||
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro SYSCALL_ENTRY trapno intno srr1
|
.macro SYSCALL_ENTRY trapno intno srr1
|
||||||
|
|
Loading…
Reference in New Issue