[FTRACE] Enabling function_graph causes OOPS

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Oct 7 20:10:21 EST 2009

On Wed, 2009-10-07 at 14:26 +0530, Sachin Sant wrote:

> As Ben suggested, i changed LOAD_REG_IMMEDIATE() to LOAD_REG_ADDR()
> as follows.
> -       LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler)
> +       LOAD_REG_ADDR(r4,ftrace_return_to_handler)
> With this change compile time warnings about bad relocations
> related to ftrace are gone.

You also need to make sure r2 is properly loaded with the kernel TOC
pointer, something like ld r2,PACAKTOC(r13) before the LOAD_REG_ADDR.


More information about the Linuxppc-dev mailing list