···1038 * We are in a module using the module's TOC.1039 * Switch to our TOC to run inside the core kernel.1040 */1041- LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler)1042- ld r2, 8(r4)10431044 bl .ftrace_return_to_handler1045 nop
···1038 * We are in a module using the module's TOC.1039 * Switch to our TOC to run inside the core kernel.1040 */1041+ ld r2, PACATOC(r13)010421043 bl .ftrace_return_to_handler1044 nop
+7-3
arch/powerpc/kernel/process.c
···1016#ifdef CONFIG_FUNCTION_GRAPH_TRACER1017 int curr_frame = current->curr_ret_stack;1018 extern void return_to_handler(void);1019- unsigned long addr = (unsigned long)return_to_handler;01020#ifdef CONFIG_PPC641021- addr = *(unsigned long*)addr;0001022#endif1023#endif1024···1048 if (!firstframe || ip != lr) {1049 printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip);1050#ifdef CONFIG_FUNCTION_GRAPH_TRACER1051- if (ip == addr && curr_frame >= 0) {1052 printk(" (%pS)",1053 (void *)current->ret_stack[curr_frame].ret);1054 curr_frame--;
···1016#ifdef CONFIG_FUNCTION_GRAPH_TRACER1017 int curr_frame = current->curr_ret_stack;1018 extern void return_to_handler(void);1019+ unsigned long rth = (unsigned long)return_to_handler;1020+ unsigned long mrth = -1;1021#ifdef CONFIG_PPC641022+ extern void mod_return_to_handler(void);1023+ rth = *(unsigned long *)rth;1024+ mrth = (unsigned long)mod_return_to_handler;1025+ mrth = *(unsigned long *)mrth;1026#endif1027#endif1028···1044 if (!firstframe || ip != lr) {1045 printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip);1046#ifdef CONFIG_FUNCTION_GRAPH_TRACER1047+ if ((ip == rth || ip == mrth) && curr_frame >= 0) {1048 printk(" (%pS)",1049 (void *)current->ret_stack[curr_frame].ret);1050 curr_frame--;