Skip to content

Commit dc2745b

Browse files
Peter Zijlstraingomolnar
authored andcommitted
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: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200416115118.808485515@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 0298739 commit dc2745b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/x86/kernel/ftrace_64.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#endif /* CONFIG_FRAME_POINTER */
2424

2525
/* Size of stack used to save mcount regs in save_mcount_regs */
26-
#define MCOUNT_REG_SIZE (SS+8 + MCOUNT_FRAME_SIZE)
26+
#define MCOUNT_REG_SIZE (FRAME_SIZE + MCOUNT_FRAME_SIZE)
2727

2828
/*
2929
* gcc -pg option adds a call to 'mcount' in most functions.
@@ -77,7 +77,7 @@
7777
/*
7878
* We add enough stack to save all regs.
7979
*/
80-
subq $(MCOUNT_REG_SIZE - MCOUNT_FRAME_SIZE), %rsp
80+
subq $(FRAME_SIZE), %rsp
8181
movq %rax, RAX(%rsp)
8282
movq %rcx, RCX(%rsp)
8383
movq %rdx, RDX(%rsp)

0 commit comments

Comments
 (0)