| /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| #include <asm/asm-offsets.h> |
| #include <asm/ppc-opcode.h> |
| _GLOBAL_TOC(ftrace_caller) |
| lbz r3, PACA_FTRACE_ENABLED(r13) |
| /* Taken from output of objdump from lib64/glibc */ |
| subi r3, r3, MCOUNT_INSN_SIZE |
| #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| _GLOBAL(ftrace_graph_stub) |
| #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| _GLOBAL(ftrace_graph_caller) |
| /* load r4 with local address */ |
| subi r4, r4, MCOUNT_INSN_SIZE |
| /* Grab the LR out of the caller stack frame */ |
| * prepare_ftrace_return gives us the address we divert to. |
| * Change the LR in the callers stack frame to this. |
| #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ |