Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200821
b: refs/heads/master
c: 56b49cd
h: refs/heads/master
i:
  200819: c071d56
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Jul 5, 2010
1 parent fc1c682 commit 83c23d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 042e571d224707b777d0995317c74812b960bfeb
refs/heads/master: 56b49cd35fd56e29adb8f97ba051a1670d24d133
12 changes: 9 additions & 3 deletions trunk/arch/mips/kernel/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
move ra, AT
.endm

/*
* The -mmcount-ra-address option of gcc 4.5 uses register $12 to pass
* the location of the parent's return address.
*/
#define MCOUNT_RA_ADDRESS_REG $12

#ifdef CONFIG_DYNAMIC_FTRACE

NESTED(ftrace_caller, PT_SIZE, ra)
Expand All @@ -70,7 +76,7 @@ _mcount:

MCOUNT_SAVE_REGS
#ifdef KBUILD_MCOUNT_RA_ADDRESS
PTR_S t0, PT_R12(sp) /* save location of parent's return address */
PTR_S MCOUNT_RA_ADDRESS_REG, PT_R12(sp)
#endif

move a0, ra /* arg1: self return address */
Expand Down Expand Up @@ -142,9 +148,9 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
#ifdef CONFIG_DYNAMIC_FTRACE
PTR_L a0, PT_R12(sp)
#else
move a0, t0
move a0, MCOUNT_RA_ADDRESS_REG
#endif
bnez a0, 1f /* non-leaf func: stored in t0 */
bnez a0, 1f /* non-leaf func: stored in MCOUNT_RA_ADDRESS_REG */
nop
#endif
PTR_LA a0, PT_R1(sp) /* leaf func: the location in current stack */
Expand Down

0 comments on commit 83c23d7

Please sign in to comment.