diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-09-15 13:11:14 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-10-17 16:41:09 +0200 |
commit | ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63 (patch) | |
tree | cd1dfa11256a97412782d35e879bc5c8bb8a30b0 /arch/x86 | |
parent | objtool: Allow STT_NOTYPE -> STT_FUNC+0 sibling-calls (diff) | |
download | linux-ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63.tar.xz linux-ef79ed20e3ae9ee9ac2e0f3a4e12814893972e63.zip |
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) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111146.539578813@infradead.org
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/entry/entry_64.S | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 5c578a7dfcd7..b24b84b3425f 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1062,11 +1062,8 @@ SYM_CODE_START_LOCAL(error_entry) UNTRAIN_RET leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ -.Lerror_entry_from_usermode_after_swapgs: - /* Put us onto the real thread stack. */ - call sync_regs - RET + jmp sync_regs /* * There are two places in the kernel that can potentially fault with @@ -1124,7 +1121,7 @@ SYM_CODE_START_LOCAL(error_entry) leaq 8(%rsp), %rdi /* arg0 = pt_regs pointer */ call fixup_bad_iret mov %rax, %rdi - jmp .Lerror_entry_from_usermode_after_swapgs + jmp sync_regs SYM_CODE_END(error_entry) SYM_CODE_START_LOCAL(error_return) |