summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@shortfin.cabal.ca>2008-03-01 10:30:19 -0800
committerKyle McMartin <kyle@shortfin.cabal.ca>2008-03-15 19:12:15 -0700
commitdc39455e7948ec9bc5f3f2dced5c2f5ac8a8dfd9 (patch)
treecccb2906d56e32b2febfdfede5caec80c64f712a /arch/parisc
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/parisc')
-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 @@
DEFINE_SPINLOCK(pa_dbit_lock);
#endif
+void parisc_show_stack(struct task_struct *t, unsigned long *sp,
+ struct pt_regs *regs);
+
static int printbinary(char *buf, unsigned long x, int nbits)
{
unsigned long mask = 1UL << (nbits - 1);
@@ -149,7 +152,7 @@ void show_regs(struct pt_regs *regs)
printk(level);
print_symbol(" RP(r2): %s\n", regs->gr[2]);
- dump_stack();
+ parisc_show_stack(current, NULL, regs);
}
@@ -183,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info)
printk("\n");
}
-void show_stack(struct task_struct *task, unsigned long *s)
+void parisc_show_stack(struct task_struct *task, unsigned long *sp,
+ struct pt_regs *regs)
{
struct unwind_frame_info info;
+ struct task_struct *t;
+
+ t = task ? task : current;
+ if (regs) {
+ unwind_frame_init(&info, t, regs);
+ goto show_stack;
+ }
- if (!task) {
+ if (t == current) {
unsigned long sp;
HERE:
@@ -203,12 +214,18 @@ HERE:
unwind_frame_init(&info, current, &r);
}
} else {
- unwind_frame_init_from_blocked_task(&info, task);
+ unwind_frame_init_from_blocked_task(&info, t);
}
+show_stack:
do_show_stack(&info);
}
+void show_stack(struct task_struct *t, unsigned long *sp)
+{
+ return parisc_show_stack(t, sp, NULL);
+}
+
int is_valid_bugaddr(unsigned long iaoq)
{
return 1;