lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH v5 05/17] 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>
    Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
    ---
    arch/x86/kernel/ftrace_64.S | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/arch/x86/kernel/ftrace_64.S
    +++ b/arch/x86/kernel/ftrace_64.S
    @@ -23,7 +23,7 @@
    #endif /* CONFIG_FRAME_POINTER */

    /* 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.
    @@ -77,7 +77,7 @@
    /*
    * 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 %rcx, RCX(%rsp)
    movq %rdx, RDX(%rsp)

    \
     
     \ /
      Last update: 2020-04-16 13:54    [W:2.084 / U:0.632 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site