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
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 @@ · 47 unmodified lines
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)

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