aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@shortfin.cabal.ca>2008-03-01 13:30:19 -0500
committerKyle McMartin <kyle@shortfin.cabal.ca>2008-03-15 22:12:15 -0400
commitdc39455e7948ec9bc5f3f2dced5c2f5ac8a8dfd9 (patch)
treecccb2906d56e32b2febfdfede5caec80c64f712a /arch
parentb23f5baab393a36ea560182fc9f9005d47a15050 (diff)
[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>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/traps.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index ce48c53fd27..9dc6dc42f9c 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -51,6 +51,9 @@
51DEFINE_SPINLOCK(pa_dbit_lock); 51DEFINE_SPINLOCK(pa_dbit_lock);
52#endif 52#endif
53 53
54void parisc_show_stack(struct task_struct *t, unsigned long *sp,
55 struct pt_regs *regs);
56
54static int printbinary(char *buf, unsigned long x, int nbits) 57static int printbinary(char *buf, unsigned long x, int nbits)
55{ 58{
56 unsigned long mask = 1UL << (nbits - 1); 59 unsigned long mask = 1UL << (nbits - 1);
@@ -149,7 +152,7 @@ void show_regs(struct pt_regs *regs)
149 printk(level); 152 printk(level);
150 print_symbol(" RP(r2): %s\n", regs->gr[2]); 153 print_symbol(" RP(r2): %s\n", regs->gr[2]);
151 154
152 dump_stack(); 155 parisc_show_stack(current, NULL, regs);
153} 156}
154 157
155 158
@@ -183,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info)
183 printk("\n"); 186 printk("\n");
184} 187}
185 188
186void show_stack(struct task_struct *task, unsigned long *s) 189void parisc_show_stack(struct task_struct *task, unsigned long *sp,
190 struct pt_regs *regs)
187{ 191{
188 struct unwind_frame_info info; 192 struct unwind_frame_info info;
193 struct task_struct *t;
194
195 t = task ? task : current;
196 if (regs) {
197 unwind_frame_init(&info, t, regs);
198 goto show_stack;
199 }
189 200
190 if (!task) { 201 if (t == current) {
191 unsigned long sp; 202 unsigned long sp;
192 203
193HERE: 204HERE:
@@ -203,12 +214,18 @@ HERE:
203 unwind_frame_init(&info, current, &r); 214 unwind_frame_init(&info, current, &r);
204 } 215 }
205 } else { 216 } else {
206 unwind_frame_init_from_blocked_task(&info, task); 217 unwind_frame_init_from_blocked_task(&info, t);
207 } 218 }
208 219
220show_stack:
209 do_show_stack(&info); 221 do_show_stack(&info);
210} 222}
211 223
224void show_stack(struct task_struct *t, unsigned long *sp)
225{
226 return parisc_show_stack(t, sp, NULL);
227}
228
212int is_valid_bugaddr(unsigned long iaoq) 229int is_valid_bugaddr(unsigned long iaoq)
213{ 230{
214 return 1; 231 return 1;