Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200822
b: refs/heads/master
c: 3a2af2d
h: refs/heads/master
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Jul 5, 2010
1 parent 83c23d7 commit 8d8dcee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 56b49cd35fd56e29adb8f97ba051a1670d24d133
refs/heads/master: 3a2af2dc1bcbfe86b1f39e9e5f9c2c5447943f16
16 changes: 14 additions & 2 deletions trunk/arch/mips/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,26 @@ int ftrace_make_nop(struct module *mod,
return -EFAULT;
}

#if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
/* lui v1, hi_16bit_of_mcount --> b 1f (0x10000005)
* addiu v1, v1, low_16bit_of_mcount
* move at, ra
* move $12, ra_address
* jalr v1
* sub sp, sp, 8
* 1: offset = 5 instructions
*/
new = 0x10000005;
#else
/* lui v1, hi_16bit_of_mcount --> b 1f (0x10000004)
* addiu v1, v1, low_16bit_of_mcount
* move at, ra
* jalr v1
* nop
* 1f: (ip + 12)
* nop | move $12, ra_address | sub sp, sp, 8
* 1: offset = 4 instructions
*/
new = 0x10000004;
#endif
} else {
/* record/calculate it for ftrace_make_call */
if (jal_mcount == 0) {
Expand Down

0 comments on commit 8d8dcee

Please sign in to comment.