Commit dc2745b6 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

x86,ftrace: Use SIZEOF_PTREGS

There's a convenient macro for 'SS+8' called FRAME_SIZE. Use it to
clarify things.

(entry/calling.h calls this SIZEOF_PTREGS but we're using
asm/ptrace-abi.h)
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarMiroslav Benes <mbenes@suse.cz>
Reviewed-by: default avatarAlexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200416115118.808485515@infradead.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 0298739b
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#endif /* CONFIG_FRAME_POINTER */ #endif /* CONFIG_FRAME_POINTER */
/* Size of stack used to save mcount regs in save_mcount_regs */ /* Size of stack used to save mcount regs in save_mcount_regs */
#define MCOUNT_REG_SIZE (SS+8 + MCOUNT_FRAME_SIZE) #define MCOUNT_REG_SIZE (FRAME_SIZE + MCOUNT_FRAME_SIZE)
/* /*
* gcc -pg option adds a call to 'mcount' in most functions. * gcc -pg option adds a call to 'mcount' in most functions.
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
/* /*
* We add enough stack to save all regs. * We add enough stack to save all regs.
*/ */
subq $(MCOUNT_REG_SIZE - MCOUNT_FRAME_SIZE), %rsp subq $(FRAME_SIZE), %rsp
movq %rax, RAX(%rsp) movq %rax, RAX(%rsp)
movq %rcx, RCX(%rsp) movq %rcx, RCX(%rsp)
movq %rdx, RDX(%rsp) movq %rdx, RDX(%rsp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment