Skip to content
  • Steven Rostedt's avatar
    powerpc, ftrace: use create_branch lib function · bb9b9035
    Steven Rostedt authored
    
    
    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: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    bb9b9035