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/traps.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/traps.c')
-rw-r--r-- | arch/sparc64/kernel/traps.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 96da847023f3..d9b8d46707d1 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2091,9 +2091,8 @@ static void user_instruction_dump(unsigned int __user *pc) | |||
2091 | 2091 | ||
2092 | void show_stack(struct task_struct *tsk, unsigned long *_ksp) | 2092 | void show_stack(struct task_struct *tsk, unsigned long *_ksp) |
2093 | { | 2093 | { |
2094 | unsigned long pc, fp, thread_base, ksp; | 2094 | unsigned long fp, thread_base, ksp; |
2095 | struct thread_info *tp; | 2095 | struct thread_info *tp; |
2096 | struct reg_window *rw; | ||
2097 | int count = 0; | 2096 | int count = 0; |
2098 | 2097 | ||
2099 | ksp = (unsigned long) _ksp; | 2098 | ksp = (unsigned long) _ksp; |
@@ -2117,15 +2116,27 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2117 | printk("\n"); | 2116 | printk("\n"); |
2118 | #endif | 2117 | #endif |
2119 | do { | 2118 | do { |
2119 | struct reg_window *rw; | ||
2120 | struct pt_regs *regs; | ||
2121 | unsigned long pc; | ||
2122 | |||
2120 | /* Bogus frame pointer? */ | 2123 | /* Bogus frame pointer? */ |
2121 | if (fp < (thread_base + sizeof(struct thread_info)) || | 2124 | if (fp < (thread_base + sizeof(struct thread_info)) || |
2122 | fp >= (thread_base + THREAD_SIZE)) | 2125 | fp >= (thread_base + THREAD_SIZE)) |
2123 | break; | 2126 | break; |
2124 | rw = (struct reg_window *)fp; | 2127 | rw = (struct reg_window *)fp; |
2125 | pc = rw->ins[7]; | 2128 | regs = (struct pt_regs *) (rw + 1); |
2129 | |||
2130 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | ||
2131 | pc = regs->tpc; | ||
2132 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | ||
2133 | } else { | ||
2134 | pc = rw->ins[7]; | ||
2135 | fp = rw->ins[6] + STACK_BIAS; | ||
2136 | } | ||
2137 | |||
2126 | printk(" [%016lx] ", pc); | 2138 | printk(" [%016lx] ", pc); |
2127 | print_symbol("%s\n", pc); | 2139 | print_symbol("%s\n", pc); |
2128 | fp = rw->ins[6] + STACK_BIAS; | ||
2129 | } while (++count < 16); | 2140 | } while (++count < 16); |
2130 | #ifndef CONFIG_KALLSYMS | 2141 | #ifndef CONFIG_KALLSYMS |
2131 | printk("\n"); | 2142 | printk("\n"); |