Loading arch/powerpc/kernel/entry_64.S +1 −2 Original line number Original line Diff line number Diff line Loading @@ -1038,8 +1038,7 @@ _GLOBAL(mod_return_to_handler) * We are in a module using the module's TOC. * We are in a module using the module's TOC. * Switch to our TOC to run inside the core kernel. * Switch to our TOC to run inside the core kernel. */ */ LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler) ld r2, PACATOC(r13) ld r2, 8(r4) bl .ftrace_return_to_handler bl .ftrace_return_to_handler nop nop Loading arch/powerpc/kernel/process.c +7 −3 Original line number Original line Diff line number Diff line Loading @@ -1016,9 +1016,13 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) #ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER int curr_frame = current->curr_ret_stack; int curr_frame = current->curr_ret_stack; extern void return_to_handler(void); extern void return_to_handler(void); unsigned long addr = (unsigned long)return_to_handler; unsigned long rth = (unsigned long)return_to_handler; unsigned long mrth = -1; #ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64 addr = *(unsigned long*)addr; extern void mod_return_to_handler(void); rth = *(unsigned long *)rth; mrth = (unsigned long)mod_return_to_handler; mrth = *(unsigned long *)mrth; #endif #endif #endif #endif Loading @@ -1044,7 +1048,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) if (!firstframe || ip != lr) { if (!firstframe || ip != lr) { printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); #ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER if (ip == addr && curr_frame >= 0) { if ((ip == rth || ip == mrth) && curr_frame >= 0) { printk(" (%pS)", printk(" (%pS)", (void *)current->ret_stack[curr_frame].ret); (void *)current->ret_stack[curr_frame].ret); curr_frame--; curr_frame--; Loading Loading
arch/powerpc/kernel/entry_64.S +1 −2 Original line number Original line Diff line number Diff line Loading @@ -1038,8 +1038,7 @@ _GLOBAL(mod_return_to_handler) * We are in a module using the module's TOC. * We are in a module using the module's TOC. * Switch to our TOC to run inside the core kernel. * Switch to our TOC to run inside the core kernel. */ */ LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler) ld r2, PACATOC(r13) ld r2, 8(r4) bl .ftrace_return_to_handler bl .ftrace_return_to_handler nop nop Loading
arch/powerpc/kernel/process.c +7 −3 Original line number Original line Diff line number Diff line Loading @@ -1016,9 +1016,13 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) #ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER int curr_frame = current->curr_ret_stack; int curr_frame = current->curr_ret_stack; extern void return_to_handler(void); extern void return_to_handler(void); unsigned long addr = (unsigned long)return_to_handler; unsigned long rth = (unsigned long)return_to_handler; unsigned long mrth = -1; #ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64 addr = *(unsigned long*)addr; extern void mod_return_to_handler(void); rth = *(unsigned long *)rth; mrth = (unsigned long)mod_return_to_handler; mrth = *(unsigned long *)mrth; #endif #endif #endif #endif Loading @@ -1044,7 +1048,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack) if (!firstframe || ip != lr) { if (!firstframe || ip != lr) { printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip); #ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER if (ip == addr && curr_frame >= 0) { if ((ip == rth || ip == mrth) && curr_frame >= 0) { printk(" (%pS)", printk(" (%pS)", (void *)current->ret_stack[curr_frame].ret); (void *)current->ret_stack[curr_frame].ret); curr_frame--; curr_frame--; Loading