History

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)

Peter Zijlstra committed 6 years ago

Commit dc2745b1 parent 02987391 file · +2 −2Browse files

Unified · Split

arch/x86/kernel/ftrace_64.S+2−2
@@ -23,7 +23,7 @@ · 22 unmodified lines
23#endif /* CONFIG_FRAME_POINTER */23#endif /* CONFIG_FRAME_POINTER */
24 24
25/* Size of stack used to save mcount regs in save_mcount_regs */25/* 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)
27 27
28/*28/*
29 * gcc -pg option adds a call to 'mcount' in most functions.29 * gcc -pg option adds a call to 'mcount' in most functions.
@@ -77,7 +77,7 @@ · 47 unmodified lines
77 /*77 /*
78 * We add enough stack to save all regs.78 * We add enough stack to save all regs.
79 */79 */
80 subq $(MCOUNT_REG_SIZE - MCOUNT_FRAME_SIZE), %rsp80 subq $(FRAME_SIZE), %rsp
81 movq %rax, RAX(%rsp)81 movq %rax, RAX(%rsp)
82 movq %rcx, RCX(%rsp)82 movq %rcx, RCX(%rsp)
83 movq %rdx, RDX(%rsp)83 movq %rdx, RDX(%rsp)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t