Skip to content

Commit

Permalink
x86/asm/entry/64: Use negative immediates for stack adjustments
Browse files Browse the repository at this point in the history
Doing so allows adjustments by 128 bytes (occurring for
REMOVE_PT_GPREGS_FROM_STACK 8 uses) to be expressed with a
single byte immediate.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/556C660F020000780007FB60@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Jun 2, 2015
1 parent 131484c commit 2bf557e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/calling.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ For 32-bit we have the following conventions - kernel is built with
#define SIZEOF_PTREGS 21*8

.macro ALLOC_PT_GPREGS_ON_STACK addskip=0
subq $15*8+\addskip, %rsp
addq $-(15*8+\addskip), %rsp
.endm

.macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
Expand Down Expand Up @@ -201,7 +201,7 @@ For 32-bit we have the following conventions - kernel is built with
.endm

.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
addq $15*8+\addskip, %rsp
subq $-(15*8+\addskip), %rsp
.endm

.macro icebp
Expand Down

0 comments on commit 2bf557e

Please sign in to comment.