x86/entry: simplify and unify SAVE/POP_REGS
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest7 patches 8 repliesIn review
- v2 RFC7 patches 7 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | x86/entry: merge SAVE_C_REGS and SAVE_EXTRA_REGS, remove unused extensionsarch/ arch/ | +19 | 0 replies | |
| 2/7 | x86/entry: merge POP_C_REGS and POP_EXTRA_REGSarch/ arch/ | +15 | 0 replies | |
| 3/7 | x86/entry: interleave XOR register clearing with PUSH instructionsarch/ arch/ | +40 | 0 replies | |
| 4/7 | x86/entry: introduce PUSH_AND_CLEAN_REGSarch/ arch/ | +38 | 4 replies | |
| 5/7 | x86/entry: use PUSH_AND_CLEAN_REGS in more casesarch/ arch/ | +6 | 0 replies | |
| 6/7 | x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGSarch/ arch/ | +10 | 0 replies | |
| 7/7 | x86/entry: indent PUSH_AND_CLEAR_REGS and POP_REGS properlyarch/ | +4 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/7] x86/entry: simplify and unify SAVE/POP_REGS
The starting point for this series was the intention to interleave the register clearing with register PUSH or MOV instructions, in order to minimize the cost of the additional instructions required for the register clearing. While at it, I noticed that a couple of macros in arch/x86/entry/calling.h are unused and can be cleaned up.
Based on a preliminary version of this patch,[1] Linus suggested to merge further codepaths and to use PUSH instead of MOV, as this should be faster on newer CPUs.
Those who are worried about the increase in text size will find a patch 8/7 which, based on a suggestion by Liunus, plays some trickery to move PUSH_AND_CLEAR_REGS from the idtentry macro to the error_entry and paranoid_entry functions. As things stand, this patch is not meant for inclusion upstream, as it is unclear whether this additional trickery is really worth the effort.
Changes since v2:[2]
- update commit message to patch 6/7 to include an explanation by Ingo Molnar on why we should not be worried too much about the increase in text size
- fix objtool warning introduced in patch 6/7
- unwind hint improvements [[email protected]]
- add testing-only patch 8/7
Changes since v1:[1]
- complete rework
[1] http://lkml.kernel.org/r/[email protected] and
http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]
NOTE / WARNING: Please be *extremely* stringent in reviewing these patches, *especially* concerning patch 6/7 (x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS).
Dominik Brodowski (7):
x86/entry: merge SAVE_C_REGS and SAVE_EXTRA_REGS, remove unused
extensions
x86/entry: merge POP_C_REGS and POP_EXTRA_REGS
x86/entry: interleave XOR register clearing with PUSH instructions x86/entry: introduce PUSH_AND_CLEAN_REGS
x86/entry: use PUSH_AND_CLEAN_REGS in more cases x86/entry: get rid of ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS x86/entry: indent PUSH_AND_CLEAR_REGS and POP_REGS properly
arch/x86/entry/calling.h | 118 ++++++++++++++++++---------------------------- arch/x86/entry/entry_64.S | 109 +++++++----------------------------------- 2 files changed, 64 insertions(+), 163 deletions(-)
Signature · 1 line
2.16.1