diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:34:20 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:34:20 (GMT) |
commit | 711f77f53c5ff6aa61dbe8e5f518e50d6306e89d (patch) | |
tree | 93bc99051b26586916a628b1a276543085f80ff2 /arch/sparc/kernel/traps_64.c | |
parent | 024a6b95181f2df6090975c8a293499d24bf8b28 (diff) | |
parent | 273fca0ecad9305247043815e185d1bfd04047d4 (diff) | |
download | linux-711f77f53c5ff6aa61dbe8e5f518e50d6306e89d.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Define ARCH_SLAB_MINALIGN
drivers/sbus/char/flash.c: flash_read should update ppos instead of file->f_pos
sparc64: Fix stack dumping and tracing when function graph is enabled.
sparc64: Show stack backtrace from show_regs() just like other platforms.
Diffstat (limited to 'arch/sparc/kernel/traps_64.c')
-rw-r--r-- | arch/sparc/kernel/traps_64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index 9da57f0..42ad2ba 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c @@ -17,6 +17,7 @@ #include <linux/mm.h> #include <linux/init.h> #include <linux/kdebug.h> +#include <linux/ftrace.h> #include <linux/gfp.h> #include <asm/smp.h> @@ -2154,6 +2155,9 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) unsigned long fp, thread_base, ksp; struct thread_info *tp; int count = 0; +#ifdef CONFIG_FUNCTION_GRAPH_TRACER + int graph = 0; +#endif ksp = (unsigned long) _ksp; if (!tsk) @@ -2193,6 +2197,16 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) } printk(" [%016lx] %pS\n", pc, (void *) pc); +#ifdef CONFIG_FUNCTION_GRAPH_TRACER + if ((pc + 8UL) == (unsigned long) &return_to_handler) { + int index = tsk->curr_ret_stack; + if (tsk->ret_stack && index >= graph) { + pc = tsk->ret_stack[index - graph].ret; + printk(" [%016lx] %pS\n", pc, (void *) pc); + graph++; + } + } +#endif } while (++count < 16); } |