diff options
Diffstat (limited to 'arch/mips/kernel/mcount.S')
-rw-r--r-- | arch/mips/kernel/mcount.S | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 00940d1d5c4f..5d25462de8a6 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
@@ -80,6 +80,19 @@ _mcount: | |||
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | PTR_SUBU a0, ra, 8 /* arg1: self address */ | 82 | PTR_SUBU a0, ra, 8 /* arg1: self address */ |
83 | PTR_LA t1, _stext | ||
84 | sltu t2, a0, t1 /* t2 = (a0 < _stext) */ | ||
85 | PTR_LA t1, _etext | ||
86 | sltu t3, t1, a0 /* t3 = (a0 > _etext) */ | ||
87 | or t1, t2, t3 | ||
88 | beqz t1, ftrace_call | ||
89 | nop | ||
90 | #if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT) | ||
91 | PTR_SUBU a0, a0, 16 /* arg1: adjust to module's recorded callsite */ | ||
92 | #else | ||
93 | PTR_SUBU a0, a0, 12 | ||
94 | #endif | ||
95 | |||
83 | .globl ftrace_call | 96 | .globl ftrace_call |
84 | ftrace_call: | 97 | ftrace_call: |
85 | nop /* a placeholder for the call to a real tracing function */ | 98 | nop /* a placeholder for the call to a real tracing function */ |