Skip to content

Commit

Permalink
Merge commit 'ftrace/ppc' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ozbenh committed Oct 15, 2009
2 parents 0f6023d + be10ab1 commit b734dd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/entry_64.S
Expand Up @@ -1038,8 +1038,7 @@ _GLOBAL(mod_return_to_handler)
* We are in a module using the module's TOC.
* Switch to our TOC to run inside the core kernel.
*/
LOAD_REG_IMMEDIATE(r4,ftrace_return_to_handler)
ld r2, 8(r4)
ld r2, PACATOC(r13)

bl .ftrace_return_to_handler
nop
Expand Down
10 changes: 7 additions & 3 deletions arch/powerpc/kernel/process.c
Expand Up @@ -1016,9 +1016,13 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
int curr_frame = current->curr_ret_stack;
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
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

Expand All @@ -1044,7 +1048,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
if (!firstframe || ip != lr) {
printk("["REG"] ["REG"] %pS", sp, ip, (void *)ip);
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
if (ip == addr && curr_frame >= 0) {
if ((ip == rth || ip == mrth) && curr_frame >= 0) {
printk(" (%pS)",
(void *)current->ret_stack[curr_frame].ret);
curr_frame--;
Expand Down

0 comments on commit b734dd5

Please sign in to comment.