]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc, ftrace: use create_branch lib function
authorSteven Rostedt <srostedt@redhat.com>
Fri, 13 Feb 2009 14:45:27 +0000 (06:45 -0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 22 Feb 2009 23:48:56 +0000 (10:48 +1100)
commitfa59098087eece2866a57e9354e1b6289bdb1d36
tree3a6cbb3a2999f2175762ba0a09f78f52933ff296
parent991cdb3e55e42d2c6ec6a0ff034824bbd05ad6e8
powerpc, ftrace: use create_branch lib function

Impact: clean up, remove duplicate code

When ftrace was first ported to PowerPC, there existed a
create_function_call that would create the instruction to make a call
to a given address. Unfortunately, this call expected to write to
the address it was given, and since it used the address to calculate
the offset, it could not be faked.

ftrace needed a way to create the instruction without actually writing
that instruction to the text section. So ftrace had to implement its
own code.

Now we have create_branch in the code patching library, which does
exactly what ftrace needs. This patch replaces ftrace's implementation
with the library function.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/ftrace.c