powerpc/64s: move ret_from_fork etc above __end_soft_masked
Code which runs with interrupts enabled should be moved above __end_soft_masked where possible, because maskable interrupts that hit below that symbol will need to consult the soft mask table, which is an extra cost. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210630074621.2109197-10-npiggin@gmail.com
This commit is contained in:
Родитель
c59458b00a
Коммит
91fc46eced
|
@ -449,32 +449,6 @@ _ASM_NOKPROBE_SYMBOL(tabort_syscall)
|
|||
b . /* prevent speculative execution */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
_GLOBAL(ret_from_fork_scv)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
li r3,0 /* fork() return value */
|
||||
b .Lsyscall_vectored_common_exit
|
||||
#endif
|
||||
|
||||
_GLOBAL(ret_from_fork)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
li r3,0 /* fork() return value */
|
||||
b .Lsyscall_exit
|
||||
|
||||
_GLOBAL(ret_from_kernel_thread)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
mtctr r14
|
||||
mr r3,r15
|
||||
#ifdef PPC64_ELF_ABI_v2
|
||||
mr r12,r14
|
||||
#endif
|
||||
bctrl
|
||||
li r3,0
|
||||
b .Lsyscall_exit
|
||||
|
||||
/*
|
||||
* If MSR EE/RI was never enabled, IRQs not reconciled, NVGPRs not
|
||||
* touched, no exit work created, then this can be used.
|
||||
|
@ -768,3 +742,29 @@ interrupt_return_macro hsrr
|
|||
__end_soft_masked:
|
||||
DEFINE_FIXED_SYMBOL(__end_soft_masked)
|
||||
#endif /* CONFIG_PPC_BOOK3S */
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
_GLOBAL(ret_from_fork_scv)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
li r3,0 /* fork() return value */
|
||||
b .Lsyscall_vectored_common_exit
|
||||
#endif
|
||||
|
||||
_GLOBAL(ret_from_fork)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
li r3,0 /* fork() return value */
|
||||
b .Lsyscall_exit
|
||||
|
||||
_GLOBAL(ret_from_kernel_thread)
|
||||
bl schedule_tail
|
||||
REST_NVGPRS(r1)
|
||||
mtctr r14
|
||||
mr r3,r15
|
||||
#ifdef PPC64_ELF_ABI_v2
|
||||
mr r12,r14
|
||||
#endif
|
||||
bctrl
|
||||
li r3,0
|
||||
b .Lsyscall_exit
|
||||
|
|
Загрузка…
Ссылка в новой задаче