diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-07-04 12:27:28 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-07-04 12:27:28 +0200 |
commit | 9f8b6a6cf0ee78de87ebe1e87f54bec1c1741ef7 (patch) | |
tree | 083e4b99c53ea1bd3efb35286ebeb5a335fd555e /arch/mips/kernel | |
parent | 729aa21ab85b5d24f3c2b1e581d71c2333f46628 (diff) | |
parent | a406ab6d77ea86ba7c713276f30ed7058ca64e31 (diff) | |
download | op-kernel-dev-9f8b6a6cf0ee78de87ebe1e87f54bec1c1741ef7.zip op-kernel-dev-9f8b6a6cf0ee78de87ebe1e87f54bec1c1741ef7.tar.gz |
Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/process.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index d2112d3..c28fbe6 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -373,18 +373,18 @@ unsigned long thread_saved_pc(struct task_struct *tsk) #ifdef CONFIG_KALLSYMS -/* used by show_backtrace() */ -unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, - unsigned long pc, unsigned long *ra) +/* generic stack unwinding function */ +unsigned long notrace unwind_stack_by_address(unsigned long stack_page, + unsigned long *sp, + unsigned long pc, + unsigned long *ra) { - unsigned long stack_page; struct mips_frame_info info; unsigned long size, ofs; int leaf; extern void ret_from_irq(void); extern void ret_from_exception(void); - stack_page = (unsigned long)task_stack_page(task); if (!stack_page) return 0; @@ -443,6 +443,15 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, *ra = 0; return __kernel_text_address(pc) ? pc : 0; } +EXPORT_SYMBOL(unwind_stack_by_address); + +/* used by show_backtrace() */ +unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, + unsigned long pc, unsigned long *ra) +{ + unsigned long stack_page = (unsigned long)task_stack_page(task); + return unwind_stack_by_address(stack_page, sp, pc, ra); +} #endif /* |