aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/optprobes.c
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2017-04-19 18:21:00 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2017-04-20 23:18:54 +1000
commit49e0b4658fe6aab5bf6bfe0738a86c1895930ad1 (patch)
tree55b41f00af83b516922d216e286f9bdfb8fc61e0 /arch/powerpc/kernel/optprobes.c
parentkprobes: Skip preparing optprobe if the probe is ftrace-based (diff)
downloadlinux-dev-49e0b4658fe6aab5bf6bfe0738a86c1895930ad1.tar.xz
linux-dev-49e0b4658fe6aab5bf6bfe0738a86c1895930ad1.zip
kprobes: Convert kprobe_lookup_name() to a function
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/optprobes.c')
-rw-r--r--arch/powerpc/kernel/optprobes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index 2282bf4e63cd..aefe076d00e0 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -243,8 +243,8 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
/*
* 2. branch to optimized_callback() and emulate_step()
*/
- kprobe_lookup_name("optimized_callback", op_callback_addr);
- kprobe_lookup_name("emulate_step", emulate_step_addr);
+ op_callback_addr = kprobe_lookup_name("optimized_callback");
+ emulate_step_addr = kprobe_lookup_name("emulate_step");
if (!op_callback_addr || !emulate_step_addr) {
WARN(1, "kprobe_lookup_name() failed\n");
goto error;