diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:37:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:37:29 -0400 |
commit | e270b51df657011983241ec61a1fc7de186e16cd (patch) | |
tree | 3397be4cbf31676ca6ebb187903e8cfc2218f223 /arch/sparc64/kernel/stacktrace.c | |
parent | 8fa82790fb9dfe57aeafc8de6b6a5c1df63efa06 (diff) | |
parent | 227739bf4c110bbd02d0c0f13b272c32de406e4c (diff) |
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: (23 commits)
sparc: sunzilog uart order
[SPARC64]: Detect trap frames in stack backtraces.
[SPARC64]: %l6 trap return handling no longer necessary.
[SPARC64]: Use trap type stored in pt_regs to handle syscall restart.
[SPARC64]: Store magic cookie and trap type in pt_regs.
[SPARC64]: PROM debug console can be CON_ANYTIME.
sparc64: cleanup after SunOS/Solaris binary emulation removal
sparc: cleanup after SunOS binary emulation removal
[SPARC64]: Add NUMA support.
[SPARC64]: Allocate TSB node-local.
[SPARC64]: NUMA device infrastructure.
[SPARC64]: Kill pci_iommu_table_init() declaration.
[SPARC64]: Once we have the boot cmdline, call parse_early_param()
[SPARC64]: Remove unused asm-sparc64/numnodes.h
[SPARC64]: Decrease SECTION_SIZE_BITS to 30.
[SPARC64]: Initialize MDESC earlier and use lmb_alloc()
[SPARC64]: Use lmb_alloc() for PROM device tree.
[SPARC64]: Call real_setup_per_cpu_areas() earlier and use lmb_alloc().
[SPARC64]: Fully use LMB information in bootmem_init().
[SPARC64]: Start using LMB information in bootmem_init().
...
Diffstat (limited to 'arch/sparc64/kernel/stacktrace.c')
-rw-r--r-- | arch/sparc64/kernel/stacktrace.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c index 84d39e873e88..01b52f561af4 100644 --- a/arch/sparc64/kernel/stacktrace.c +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -20,6 +20,8 @@ void save_stack_trace(struct stack_trace *trace) | |||
20 | thread_base = (unsigned long) tp; | 20 | thread_base = (unsigned long) tp; |
21 | do { | 21 | do { |
22 | struct reg_window *rw; | 22 | struct reg_window *rw; |
23 | struct pt_regs *regs; | ||
24 | unsigned long pc; | ||
23 | 25 | ||
24 | /* Bogus frame pointer? */ | 26 | /* Bogus frame pointer? */ |
25 | if (fp < (thread_base + sizeof(struct thread_info)) || | 27 | if (fp < (thread_base + sizeof(struct thread_info)) || |
@@ -27,11 +29,19 @@ void save_stack_trace(struct stack_trace *trace) | |||
27 | break; | 29 | break; |
28 | 30 | ||
29 | rw = (struct reg_window *) fp; | 31 | rw = (struct reg_window *) fp; |
32 | regs = (struct pt_regs *) (rw + 1); | ||
33 | |||
34 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | ||
35 | pc = regs->tpc; | ||
36 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | ||
37 | } else { | ||
38 | pc = rw->ins[7]; | ||
39 | fp = rw->ins[6] + STACK_BIAS; | ||
40 | } | ||
41 | |||
30 | if (trace->skip > 0) | 42 | if (trace->skip > 0) |
31 | trace->skip--; | 43 | trace->skip--; |
32 | else | 44 | else |
33 | trace->entries[trace->nr_entries++] = rw->ins[7]; | 45 | trace->entries[trace->nr_entries++] = pc; |
34 | |||
35 | fp = rw->ins[6] + STACK_BIAS; | ||
36 | } while (trace->nr_entries < trace->max_entries); | 46 | } while (trace->nr_entries < trace->max_entries); |
37 | } | 47 | } |