Commit d65987a88dc8b182ef933edf93c23cf4233dd8d5
1 parent
f397c077e1
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
microblaze: ftrace: Pass the first calling instruction for dynamic ftrace
Selftest for dynamic ftrace requres to pass address of the first calling instruction because hash function is calculated from it. ftrace_update_ftrace_func setups pointer to function which is called in _mcount function. trace_selftest is not aware about instruction size (for microblaze 8 - imm and addik) and that's why we have to pass in r5 address of imm not addik which is in r15.12 For more info look at ftrace_ops_list_func/ftrace.c. Signed-off-by: Michal Simek <monstr@monstr.eu>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
arch/microblaze/kernel/mcount.S
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
139 | 139 | /* static normal trace */ |
140 | 140 | lwi r6, r1, 120; /* MS: load parent addr */ |
141 | - addik r5, r15, 0; /* MS: load current function addr */ | |
141 | + addik r5, r15, -4; /* MS: load current function addr */ | |
142 | 142 | /* MS: here is dependency on previous code */ |
143 | 143 | brald r15, r20; /* MS: jump to ftrace handler */ |
144 | 144 | nop; |