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>
This commit is contained in:

committed by
Michael Ellerman

parent
a460246c70
commit
49e0b4658f
@@ -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;
|
||||
|
Reference in New Issue
Block a user