[PATCH OLK-6.6] arm64: entry: Inline el0_xcall() to improve xcall performace

hulk inclusion category: performance bugzilla: https://gitee.com/openeuler/release-management/issues/IBV2E4 -------------------------------- When inline el0_xcall(), the Unixbench syscall benchmark test has 6 ~ 7% performance improvement on 1650, and 1% performance improvement on 920B. As there is conflit between noinstr and __always_inline, inline el0_xcall() within el0t_64_fast_syscall_handler() and el0t_64_xcall_handler(), and remove el0_xcall(). Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- arch/arm64/kernel/entry-common.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c index 1e8171c1efe7..c6013a394a8a 100644 --- a/arch/arm64/kernel/entry-common.c +++ b/arch/arm64/kernel/entry-common.c @@ -818,8 +818,7 @@ static void noinstr el0_fpac(struct pt_regs *regs, unsigned long esr) } #ifdef CONFIG_FAST_SYSCALL -/* Copy from el0_sync */ -static void noinstr el0_xcall(struct pt_regs *regs) +asmlinkage void noinstr el0t_64_fast_syscall_handler(struct pt_regs *regs) { fast_enter_from_user_mode(regs); #ifndef CONFIG_SECURITY_FEATURE_BYPASS @@ -830,11 +829,6 @@ static void noinstr el0_xcall(struct pt_regs *regs) do_el0_svc(regs); fast_exit_to_user_mode(regs); } - -asmlinkage void noinstr el0t_64_fast_syscall_handler(struct pt_regs *regs) -{ - el0_xcall(regs); -} #endif asmlinkage void noinstr el0t_64_sync_handler(struct pt_regs *regs) @@ -1054,8 +1048,16 @@ UNHANDLED(el0t, 32, error) #ifdef CONFIG_ACTLR_XCALL_XINT asmlinkage void noinstr el0t_64_xcall_handler(struct pt_regs *regs) { - el0_xcall(regs); + fast_enter_from_user_mode(regs); +#ifndef CONFIG_SECURITY_FEATURE_BYPASS + cortex_a76_erratum_1463225_svc_handler(); +#endif + fp_user_discard(); + local_daif_restore(DAIF_PROCCTX); + do_el0_svc(regs); + fast_exit_to_user_mode(regs); } + asmlinkage void noinstr el0t_64_xint_handler(struct pt_regs *regs) { el0_interrupt(regs, ISR_EL1_IS, handle_arch_irq, handle_arch_nmi_irq); -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17771 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/7PJ... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17771 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/7PJ...
participants (2)
-
Jinjie Ruan
-
patchwork bot