aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/ftrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/ftrace.c')
-rw-r--r--arch/mips/kernel/ftrace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 83fa1460e294..cf5509f13dd5 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -125,21 +125,21 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
125 * 125 *
126 * 2.1 For KBUILD_MCOUNT_RA_ADDRESS and CONFIG_32BIT 126 * 2.1 For KBUILD_MCOUNT_RA_ADDRESS and CONFIG_32BIT
127 * 127 *
128 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000005) 128 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000005)
129 * addiu v1, v1, low_16bit_of_mcount 129 * addiu v1, v1, low_16bit_of_mcount
130 * move at, ra 130 * move at, ra
131 * move $12, ra_address 131 * move $12, ra_address
132 * jalr v1 132 * jalr v1
133 * sub sp, sp, 8 133 * sub sp, sp, 8
134 * 1: offset = 5 instructions 134 * 1: offset = 5 instructions
135 * 2.2 For the Other situations 135 * 2.2 For the Other situations
136 * 136 *
137 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000004) 137 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000004)
138 * addiu v1, v1, low_16bit_of_mcount 138 * addiu v1, v1, low_16bit_of_mcount
139 * move at, ra 139 * move at, ra
140 * jalr v1 140 * jalr v1
141 * nop | move $12, ra_address | sub sp, sp, 8 141 * nop | move $12, ra_address | sub sp, sp, 8
142 * 1: offset = 4 instructions 142 * 1: offset = 4 instructions
143 */ 143 */
144 144
145#define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS) 145#define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS)
@@ -228,8 +228,8 @@ int ftrace_disable_ftrace_graph_caller(void)
228 228
229#ifndef KBUILD_MCOUNT_RA_ADDRESS 229#ifndef KBUILD_MCOUNT_RA_ADDRESS
230 230
231#define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */ 231#define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */
232#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */ 232#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
233#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */ 233#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
234 234
235unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long 235unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long