diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2018-02-21 03:42:14 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-02-21 16:54:07 +0100 |
commit | 0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac (patch) | |
tree | 866043b4ad57ddfb6fe60eef21ea1b0381e9f36e /arch | |
parent | extable: Make init_kernel_text() global (diff) | |
download | linux-0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac.tar.xz linux-0ca7d5baa1787e5f2a7abd6bfca3303b1bbb48ac.zip |
x86/entry/64: Simplify ENCODE_FRAME_POINTER
On 64-bit, the stack pointer is always aligned on interrupt, so instead
of setting the LSB of the pt_regs address, we can just add 1 to it.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrew Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180221024214.lhl5jfgw33c4vz3m@treble
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/entry/calling.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index 5d10b7a85cad..be63330c5511 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -181,12 +181,7 @@ For 32-bit we have the following conventions - kernel is built with */ .macro ENCODE_FRAME_POINTER ptregs_offset=0 #ifdef CONFIG_FRAME_POINTER - .if \ptregs_offset - leaq \ptregs_offset(%rsp), %rbp - .else - mov %rsp, %rbp - .endif - orq $0x1, %rbp + leaq 1+\ptregs_offset(%rsp), %rbp #endif .endm |