Messages in this thread Patch in this message | | | Date | Tue, 6 Feb 2018 22:25:46 +0100 | From | Dominik Brodowski <> | Subject | [PATCH tip-pti 1/2] x86/entry: remove SAVE_C_REGS_EXCEPT_* macros |
| |
The macros which save all but specific registers have been unused for a long time. Remove them and the SAVE_C_REGS_HELPER macro, but instead provide the SAVE_C_REGS macro directly.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index f4b129d4af42..75a237c95ff7 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -101,41 +101,18 @@ For 32-bit we have the following conventions - kernel is built with addq $-(15*8), %rsp .endm - .macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1 - .if \r11 + .macro SAVE_C_REGS offset=0 movq %r11, 6*8+\offset(%rsp) - .endif - .if \r8910 movq %r10, 7*8+\offset(%rsp) movq %r9, 8*8+\offset(%rsp) movq %r8, 9*8+\offset(%rsp) - .endif - .if \rax movq %rax, 10*8+\offset(%rsp) - .endif - .if \rcx movq %rcx, 11*8+\offset(%rsp) - .endif movq %rdx, 12*8+\offset(%rsp) movq %rsi, 13*8+\offset(%rsp) movq %rdi, 14*8+\offset(%rsp) UNWIND_HINT_REGS offset=\offset extra=0 .endm - .macro SAVE_C_REGS offset=0 - SAVE_C_REGS_HELPER \offset, 1, 1, 1, 1 - .endm - .macro SAVE_C_REGS_EXCEPT_RAX_RCX offset=0 - SAVE_C_REGS_HELPER \offset, 0, 0, 1, 1 - .endm - .macro SAVE_C_REGS_EXCEPT_R891011 - SAVE_C_REGS_HELPER 0, 1, 1, 0, 0 - .endm - .macro SAVE_C_REGS_EXCEPT_RCX_R891011 - SAVE_C_REGS_HELPER 0, 1, 0, 0, 0 - .endm - .macro SAVE_C_REGS_EXCEPT_RAX_RCX_R11 - SAVE_C_REGS_HELPER 0, 0, 0, 1, 0 - .endm .macro SAVE_EXTRA_REGS offset=0 movq %r15, 0*8+\offset(%rsp)
| |