diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-18 02:44:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-18 02:44:31 -0400 |
commit | 2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch) | |
tree | 9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /arch/parisc/kernel/traps.c | |
parent | 5e226e4d9016daee170699f8a4188a5505021756 (diff) | |
parent | bde4f8fa8db2abd5ac9c542d76012d0fedab050f (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.c | 25 |
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 @@ | |||
51 | DEFINE_SPINLOCK(pa_dbit_lock); | 51 | DEFINE_SPINLOCK(pa_dbit_lock); |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | void parisc_show_stack(struct task_struct *t, unsigned long *sp, | ||
55 | struct pt_regs *regs); | ||
56 | |||
54 | static int printbinary(char *buf, unsigned long x, int nbits) | 57 | static 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 | ||
184 | void show_stack(struct task_struct *task, unsigned long *s) | 189 | void 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 | ||
191 | HERE: | 204 | HERE: |
@@ -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 | ||
220 | show_stack: | ||
207 | do_show_stack(&info); | 221 | do_show_stack(&info); |
208 | } | 222 | } |
209 | 223 | ||
224 | void show_stack(struct task_struct *t, unsigned long *sp) | ||
225 | { | ||
226 | return parisc_show_stack(t, sp, NULL); | ||
227 | } | ||
228 | |||
210 | int is_valid_bugaddr(unsigned long iaoq) | 229 | int is_valid_bugaddr(unsigned long iaoq) |
211 | { | 230 | { |
212 | return 1; | 231 | return 1; |