[PARISC] clean up show_stack

When we show_regs, we obviously have a struct pt_regs of the calling
frame. Use these in show_stack so we don't have the entire bogus call trace
up to the show_stack call.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>

+21 -4
+21 -4
arch/parisc/kernel/traps.c
··· 51 51 DEFINE_SPINLOCK(pa_dbit_lock); 52 52 #endif 53 53 54 + void parisc_show_stack(struct task_struct *t, unsigned long *sp, 55 + struct pt_regs *regs); 56 + 54 57 static int printbinary(char *buf, unsigned long x, int nbits) 55 58 { 56 59 unsigned long mask = 1UL << (nbits - 1); ··· 152 149 printk(level); 153 150 print_symbol(" RP(r2): %s\n", regs->gr[2]); 154 151 155 - dump_stack(); 152 + parisc_show_stack(current, NULL, regs); 156 153 } 157 154 158 155 ··· 186 183 printk("\n"); 187 184 } 188 185 189 - void show_stack(struct task_struct *task, unsigned long *s) 186 + void parisc_show_stack(struct task_struct *task, unsigned long *sp, 187 + struct pt_regs *regs) 190 188 { 191 189 struct unwind_frame_info info; 190 + struct task_struct *t; 192 191 193 - if (!task) { 192 + t = task ? task : current; 193 + if (regs) { 194 + unwind_frame_init(&info, t, regs); 195 + goto show_stack; 196 + } 197 + 198 + if (t == current) { 194 199 unsigned long sp; 195 200 196 201 HERE: ··· 214 203 unwind_frame_init(&info, current, &r); 215 204 } 216 205 } else { 217 - unwind_frame_init_from_blocked_task(&info, task); 206 + unwind_frame_init_from_blocked_task(&info, t); 218 207 } 219 208 209 + show_stack: 220 210 do_show_stack(&info); 211 + } 212 + 213 + void show_stack(struct task_struct *t, unsigned long *sp) 214 + { 215 + return parisc_show_stack(t, sp, NULL); 221 216 } 222 217 223 218 int is_valid_bugaddr(unsigned long iaoq)