Skip to content

Commit ef79ed2

Browse files
author
Peter Zijlstra
committed
x86/entry: Make sync_regs() invocation a tail call
No point in having a call there. Spare the call/ret overhead. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5a9c361 commit ef79ed2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/x86/entry/entry_64.S

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,11 +1062,8 @@ SYM_CODE_START_LOCAL(error_entry)
10621062
UNTRAIN_RET
10631063

10641064
leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */
1065-
.Lerror_entry_from_usermode_after_swapgs:
1066-
10671065
/* Put us onto the real thread stack. */
1068-
call sync_regs
1069-
RET
1066+
jmp sync_regs
10701067

10711068
/*
10721069
* There are two places in the kernel that can potentially fault with
@@ -1124,7 +1121,7 @@ SYM_CODE_START_LOCAL(error_entry)
11241121
leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */
11251122
call fixup_bad_iret
11261123
mov %rax, %rdi
1127-
jmp .Lerror_entry_from_usermode_after_swapgs
1124+
jmp sync_regs
11281125
SYM_CODE_END(error_entry)
11291126

11301127
SYM_CODE_START_LOCAL(error_return)

0 commit comments

Comments
 (0)