diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:13:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:13:34 -0400 |
| commit | ed402af3c23a4804b3f8899263e8d0f97c62ab49 (patch) | |
| tree | 3aa971aea57f900a3060cc0545b199ef611f4dcf /arch/sh/kernel/stacktrace.c | |
| parent | 096e6f673dc02a6394dc9a7d8f8735c6978f5b91 (diff) | |
| parent | 40e24c403f325715f9c43b9fed2068641201ee0b (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (112 commits)
sh: Move SH-4 CPU headers down one more level.
sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.
sh: Migrate common board headers to mach-common/.
sh: Move the CPU definition headers from asm/ to cpu/.
serial: sh-sci: Add support SCIF of SH7723
video: add sh_mobile_lcdc platform flags
video: remove unused sh_mobile_lcdc platform data
sh: remove consistent alloc cruft
sh: add dynamic crash base address support
sh: reduce Migo-R smc91x overruns
sh: Fix up some merge damage.
Fix debugfs_create_file's error checking method for arch/sh/mm/
Fix debugfs_create_dir's error checking method for arch/sh/kernel/
sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board
sh: Use sh7720 GPIO on magicpanelr2 board
sh: Add sh7720 pinmux code
sh: Use sh7203 GPIO on rsk7203 board
sh: Add sh7203 pinmux code
sh: Use sh7723 GPIO on AP325RXA board
sh: Add sh7723 pinmux code
...
Diffstat (limited to 'arch/sh/kernel/stacktrace.c')
| -rw-r--r-- | arch/sh/kernel/stacktrace.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index 54d1f61aa007..1a2a5eb76e41 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Stack trace management functions | 4 | * Stack trace management functions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2006 Paul Mundt | 6 | * Copyright (C) 2006 - 2008 Paul Mundt |
| 7 | * | 7 | * |
| 8 | * This file is subject to the terms and conditions of the GNU General Public | 8 | * This file is subject to the terms and conditions of the GNU General Public |
| 9 | * License. See the file "COPYING" in the main directory of this archive | 9 | * License. See the file "COPYING" in the main directory of this archive |
| @@ -36,3 +36,24 @@ void save_stack_trace(struct stack_trace *trace) | |||
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | EXPORT_SYMBOL_GPL(save_stack_trace); | 38 | EXPORT_SYMBOL_GPL(save_stack_trace); |
| 39 | |||
| 40 | void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) | ||
| 41 | { | ||
| 42 | unsigned long *sp = (unsigned long *)tsk->thread.sp; | ||
| 43 | |||
| 44 | while (!kstack_end(sp)) { | ||
| 45 | unsigned long addr = *sp++; | ||
| 46 | |||
| 47 | if (__kernel_text_address(addr)) { | ||
| 48 | if (in_sched_functions(addr)) | ||
| 49 | break; | ||
| 50 | if (trace->skip > 0) | ||
| 51 | trace->skip--; | ||
| 52 | else | ||
| 53 | trace->entries[trace->nr_entries++] = addr; | ||
| 54 | if (trace->nr_entries >= trace->max_entries) | ||
| 55 | break; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | EXPORT_SYMBOL_GPL(save_stack_trace_tsk); | ||
