From f0249420ac5484095b0e5faa27d4b80b217c9cb3 Mon Sep 17 00:00:00 2001 From: Mao Minkai Date: Fri, 12 Aug 2022 15:24:06 +0800 Subject: [PATCH] sw64: optimize instruction usage in fork routine Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNDF -------------------------------- Use 'call' instead of 'jmp' in ret_from_fork(), so the 'ret' in schedule_tail() won't mess up branch prediction. Signed-off-by: Mao Minkai Signed-off-by: Gu Zitao --- arch/sw_64/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sw_64/kernel/entry.S b/arch/sw_64/kernel/entry.S index a52665c3bb08..67bafd4a930a 100644 --- a/arch/sw_64/kernel/entry.S +++ b/arch/sw_64/kernel/entry.S @@ -426,7 +426,7 @@ __switch_to: .ent ret_from_fork ret_from_fork: ldi $26, ret_from_sys_call - jmp $31, schedule_tail + call $31, schedule_tail .end ret_from_fork /* -- GitLab