projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a9c361
)
x86/entry: Make sync_regs() invocation a tail call
author
Peter Zijlstra
<peterz@infradead.org>
Thu, 15 Sep 2022 11:11:14 +0000
(13:11 +0200)
committer
Peter Zijlstra
<peterz@infradead.org>
Mon, 17 Oct 2022 14:41:09 +0000
(16:41 +0200)
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
arch/x86/entry/entry_64.S
patch
|
blob
|
history
diff --git
a/arch/x86/entry/entry_64.S
b/arch/x86/entry/entry_64.S
index 5c578a7dfcd79def8cbb934f175fd81a09cad3fb..b24b84b3425fb50232688972384de46bb1c33d5b 100644
(file)
--- 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_swap
gs
+ jmp
sync_re
gs
SYM_CODE_END(error_entry)
SYM_CODE_START_LOCAL(error_return)