aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/traps.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-18 02:44:31 -0400
commit2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch)
tree9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /arch/parisc/kernel/traps.c
parent5e226e4d9016daee170699f8a4188a5505021756 (diff)
parentbde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/parisc/kernel/traps.c')
-rw-r--r--arch/parisc/kernel/traps.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 99fd56939afa..9dc6dc42f9cf 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);
@@ -148,6 +151,8 @@ void show_regs(struct pt_regs *regs)
148 print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]); 151 print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]);
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]);
154
155 parisc_show_stack(current, NULL, regs);
151} 156}
152 157
153 158
@@ -181,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info)
181 printk("\n"); 186 printk("\n");
182} 187}
183 188
184void 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)
185{ 191{
186 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 }
187 200
188 if (!task) { 201 if (t == current) {
189 unsigned long sp; 202 unsigned long sp;
190 203
191HERE: 204HERE:
@@ -201,12 +214,18 @@ HERE:
201 unwind_frame_init(&info, current, &r); 214 unwind_frame_init(&info, current, &r);
202 } 215 }
203 } else { 216 } else {
204 unwind_frame_init_from_blocked_task(&info, task); 217 unwind_frame_init_from_blocked_task(&info, t);
205 } 218 }
206 219
220show_stack:
207 do_show_stack(&info); 221 do_show_stack(&info);
208} 222}
209 223
224void show_stack(struct task_struct *t, unsigned long *sp)
225{
226 return parisc_show_stack(t, sp, NULL);
227}
228
210int is_valid_bugaddr(unsigned long iaoq) 229int is_valid_bugaddr(unsigned long iaoq)
211{ 230{
212 return 1; 231 return 1;